Skip to content

Instantly share code, notes, and snippets.

@chenyaofo
Last active December 7, 2022 08:01
Show Gist options
  • Save chenyaofo/04c867cb0c71e979e39781e0a5868766 to your computer and use it in GitHub Desktop.
Save chenyaofo/04c867cb0c71e979e39781e0a5868766 to your computer and use it in GitHub Desktop.
FROM nvcr.io/nvidia/pytorch:22.11-py3
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 \
TZ=Asia/Shanghai
RUN APT_INSTALL="apt-get install -y --no-install-recommends --no-install-suggests" && \
GIT_CLONE="git clone --depth 10" && \
mirror_url=mirrors.cloud.tencent.com && \
sed -i "s/security.ubuntu.com/$mirror_url/" /etc/apt/sources.list && \
sed -i "s/archive.ubuntu.com/$mirror_url/" /etc/apt/sources.list && \
sed -i "s/security-cdn.ubuntu.com/$mirror_url/" /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive $APT_INSTALL ca-certificates tzdata git wget curl vim htop rsync psmisc unzip openssh-server dnsutils iputils-ping net-tools rsync lftp ncdu tmux less rclone && \
apt-get clean
RUN ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo ${TZ} > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata
RUN PIP_INSTALL="/usr/local/bin/pip install --upgrade --no-cache-dir -i https://mirrors.cloud.tencent.com/pypi/simple/" && \
$PIP_INSTALL tfrecord scipy scikit-learn pandas numba scikit-image && \
$PIP_INSTALL fvcore glances gpustat && \
$PIP_INSTALL pyyaml pyhocon && \
$PIP_INSTALL webdataset && \
$PIP_INSTALL tensorboard requests jupyterlab && \
echo 'PIP Install Done!'
CMD ["sh","-c", "/usr/local/bin/jupyter lab --no-browser --ip=0.0.0.0 --allow-root --notebook-dir='/code' --port=8888 --LabApp.token='' --LabApp.allow_origin='*' --LabApp.base_url=$OCTOPUS_JPY_BASE_URL"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment