# Self-modify the basic imageFROM ubuntu:20.04# Install openssh-serverRUN apt-get update && apt-get install -y openssh-server && apt-get clean && mkdir -p /var/run/sshd
# Self-modify the basic imageFROM ubuntu:20.04# Install openssh-serverRUN apt-get update && apt-get install -y openssh-server && apt-get clean && mkdir -p /var/run/sshd# Install python3, pip3RUN apt-get update && apt-get install -y python3.8 python3.8-distutils curl && \\curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \\python3.8 get-pip.py && rm -f get-pip.py# Install jupyterlabRUN pip3 install jupyterlab# Configure the /opt/dl/run startup scriptRUN mkdir -p /opt/dl && echo "cd /home/tione/notebook && jupyter lab --allow-root --no-browser --ip=0.0.0.0 --port=8888 --notebook-dir=/home/tione/notebook --NotebookApp.allow_origin='*' --NotebookApp.token=''" > /opt/dl/run && chmod a+x /opt/dl/run
# [Recommended] Use NVIDIA's PyTorch image as the basic image to be compatible with newer open-source libraries and GPU card types.FROM nvcr.io/nvidia/pytorch:23.07-py3# [Recommended] Modify the software source (if using in Tencent Cloud, it is recommended to use the private network source).# [Tencent Public Network Software Source] mirrors.tencent.com# [Tencent Cloud Private Network Software Source] mirrors.tencentyun.comENV TENCENT_MIRRORS="mirrors.tencentyun.com"RUN sed -i "s/archive.ubuntu.com/${TENCENT_MIRRORS}/g" /etc/apt/sources.list && \\sed -i "s/security.ubuntu.com/${TENCENT_MIRRORS}/g" /etc/apt/sources.list && \\pip config set global.index-url http://${TENCENT_MIRRORS}/pypi/simple && \\pip config set global.no-cache-dir true && \\pip config set global.trusted-host ${TENCENT_MIRRORS}# [Recommended] If using NVIDIA's PyTorch mirror, it is recommended to delete the default NVIDIA source to speed up pip package query and installation.RUN rm /etc/xdg/pip/pip.conf /etc/pip.conf /root/.pip/pip.conf /root/.config/pip/pip.conf && pip config unset global.extra-index-url# [Basic Image Specification] Install openssh-server. The SSH login functionality of notebook and task-based modeling both depend on the openssh-server component.RUN apt-get update && apt-get install -y openssh-server && apt-get clean && mkdir -p /var/run/sshd# [Notebook Image Specification] Configure the /opt/dl/run startup entryRUN mkdir -p /opt/dl && echo "cd /home/tione/notebook && jupyter lab --allow-root --no-browser --ip=0.0.0.0 --port=8888 --notebook-dir=/home/tione/notebook --NotebookApp.allow_origin='*' --NotebookApp.token=''" > /opt/dl/run && chmod a+x /opt/dl/run# [Recommended] Use tini as the entrypoint to facilitate reclaiming zombie processesRUN apt-get update && apt-get install -y tini && apt-get cleanENTRYPOINT ["/usr/bin/tini", "-g", "--"]# [Optional - Recommended installation when using HCC-GPU instances] TCCL RDMA communication optimization# (If using NVIDIA's PyTorch mirror, need to delete the pre-installed NCCL plugin in /opt/hpcx/nccl_rdma_sharp_plugin/lib)RUN wget https://taco-1251783334.cos.ap-shanghai.myqcloud.com/nccl/nccl-rdma-sharp-plugins_1.2_amd64.deb && \\dpkg -i nccl-rdma-sharp-plugins_1.2_amd64.deb && rm -f nccl-rdma-sharp-plugins_1.2_amd64.deb && \\rm -rf /opt/hpcx/nccl_rdma_sharp_plugin/lib/*# [Optional] Install Tikit (excluding big data components)RUN pip install tencentcloud-sdk-python==3.0.955 coscmd==1.8.6.31 && \\pip install --no-dependencies -U tikit# [Custom] Install required dependency libraries.RUN pip3 install accelerate==0.21.0 bitsandbytes==0.40.2 datasets==2.14.1 deepspeed==0.10.0 evaluate==0.4.0 peft==0.4.0 protobuf==3.20.3 scipy==1.10.1 sentencepiece==0.1.99 transformers==4.31.0
Feedback