Skip to content

Commit d25c465

Browse files
committed
优化 dockerfile
1 parent 334f681 commit d25c465

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ FROM nvidia/cuda:12.2.0-runtime-ubuntu20.04
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
COPY ./ /gpt_server
6-
7-
WORKDIR /gpt_server
8-
95
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
106
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
117
echo "开始安装python依赖环境" && apt-get update -y && apt install software-properties-common python3-dev build-essential git -y && add-apt-repository ppa:deadsnakes/ppa -y && \
128
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 && \
139
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
14-
ln -sf $(which python3.10) /usr/local/bin/python
10+
ln -sf $(which python3.10) /usr/local/bin/python && \
11+
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
12+
13+
COPY ./ /gpt_server
14+
WORKDIR /gpt_server
1515

1616
RUN sh install.sh && pip cache purge
1717

0 commit comments

Comments
 (0)