一、创建requirements.txt
torch>=1.4.0
torchvision>=0.5.0
dominate>=2.4.0
visdom>=0.1.8.8
wandb
二、创建Dockerfile
FROM nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04
MAINTAINER Ma Yue
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN sed -i 's#http://archive.ubuntu.com/#http://mirrors.aliyun.com/#' /etc/apt/sources.list \
&& sed -i 's#http://security.ubuntu.com/#http://mirrors.aliyun.com/#' /etc/apt/sources.list
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
RUN apt-get update \
&& apt-get install -y software-properties-common curl libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext-dev scrot \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get remove -y software-properties-common \
&& apt autoremove -y