Skip to content

Commit

Permalink
优化 dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shell-nlp committed Oct 26, 2024
1 parent 334f681 commit d25c465
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ FROM nvidia/cuda:12.2.0-runtime-ubuntu20.04

ENV DEBIAN_FRONTEND=noninteractive

COPY ./ /gpt_server

WORKDIR /gpt_server

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
ln -sf $(which python3.10) /usr/local/bin/python && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY ./ /gpt_server
WORKDIR /gpt_server

RUN sh install.sh && pip cache purge

Expand Down

0 comments on commit d25c465

Please sign in to comment.