Skip to content

Commit

Permalink
替换为 uv 管理
Browse files Browse the repository at this point in the history
  • Loading branch information
shell-nlp committed Dec 7, 2024
1 parent d4567b5 commit 9e03adf
Show file tree
Hide file tree
Showing 9 changed files with 880 additions and 954 deletions.
15 changes: 3 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
FROM nvidia/cuda:12.2.0-runtime-ubuntu20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
echo "开始安装python依赖环境" && apt-get update -y && apt install software-properties-common python3-dev build-essential git -y && add-apt-repository ppa:deadsnakes/ppa -y && \
echo "开始安装python3.10" && apt-get install -y python3.10 curl && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.10 get-pip.py && \
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
ln -sf $(which python3.10) /usr/local/bin/python && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM docker.rainbond.cc/506610466/cuda:12.2.0-runtime-ubuntu20.04-uv

COPY ./ /gpt_server
WORKDIR /gpt_server

RUN sh install.sh && pip cache purge
RUN uv venv --seed && uv sync && uv cache clean && \
echo '[[ -f .venv/bin/activate ]] && source .venv/bin/activate' >> ~/.bashrc

CMD ["/bin/bash"]
4 changes: 0 additions & 4 deletions Dockerfile.copy
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
FROM docker.rainbond.cc/506610466/gpt_server:latest

RUN rm -rf /gpt_server

COPY ./ /gpt_server

WORKDIR /gpt_server

# RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && sh install.sh && pip cache purge && ln -sf $(which python3.10) /usr/local/bin/python

CMD ["/bin/bash"]
9 changes: 0 additions & 9 deletions Dockerfile.copy_test

This file was deleted.

9 changes: 0 additions & 9 deletions Dockerfile_test

This file was deleted.

26 changes: 0 additions & 26 deletions docker-compose.yml

This file was deleted.

File renamed without changes.
3 changes: 1 addition & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pip install -r requirements.txt
pip install --force-reinstall lmdeploy==0.6.2 --no-deps
pip install -r requirements.txt --no-deps
Loading

0 comments on commit 9e03adf

Please sign in to comment.