-
-
Save liujingcs/d28177b713fef91f68c1198a0e74319d to your computer and use it in GitHub Desktop.
pytorch1.3-py37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================================================================== | |
# module list | |
# ------------------------------------------------------------------ | |
# python 3.7 (miniconda) | |
# pytorch 1.3.0 (conda) | |
# ================================================================== | |
FROM nvidia/cuda:10.1-runtime-ubuntu18.04 | |
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | |
ENV PATH /opt/conda/bin:$PATH | |
RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \ | |
GIT_CLONE="git clone --depth 10" && \ | |
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse' > /etc/apt/sources.list && \ | |
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse' >> /etc/apt/sources.list && \ | |
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse' >> /etc/apt/sources.list && \ | |
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse' >> /etc/apt/sources.list && \ | |
cat /etc/apt/sources.list && \ | |
rm -rf /var/lib/apt/lists/* \ | |
/etc/apt/sources.list.d/cuda.list \ | |
/etc/apt/sources.list.d/nvidia-ml.list && \ | |
apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive $APT_INSTALL wget bzip2 graphviz git && \ | |
apt-get clean | |
RUN wget --quiet https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh -O ~/miniconda.sh && \ | |
/bin/bash ~/miniconda.sh -b -p /opt/conda && \ | |
rm ~/miniconda.sh && \ | |
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | |
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | |
echo "conda activate base" >> ~/.bashrc && \ | |
find /opt/conda/ -follow -type f -name '*.a' -delete && \ | |
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ | |
/opt/conda/bin/conda clean -afy | |
RUN CONDA_INSTALL="/opt/conda/bin/conda install -y" && \ | |
/opt/conda/bin/conda config --set show_channel_urls yes && \ | |
$CONDA_INSTALL ipdb pyhocon glances -c conda-forge && \ | |
$CONDA_INSTALL setuptools cython future ipython && \ | |
$CONDA_INSTALL pytest graphviz jinja2 && \ | |
$CONDA_INSTALL accimage pillow pycocotools -c conda-forge && \ | |
$CONDA_INSTALL scipy numpy scikit-learn pandas matplotlib && \ | |
/opt/conda/bin/conda clean -ay | |
RUN CONDA_INSTALL="/opt/conda/bin/conda install -y" && \ | |
$CONDA_INSTALL pytorch torchvision cudatoolkit=10.1 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch && \ | |
/opt/conda/bin/conda clean -ay | |
RUN PIP_INSTALL="/opt/conda/bin/pip --no-cache-dir install --upgrade" && \ | |
/opt/conda/bin/pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple && \ | |
$PIP_INSTALL tb-nightly && \ | |
$PIP_INSTALL git+https://github.com/chenyaofo/flame.git@develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment