Torch
Build PyTorch from source
RUN git clone https://github.com/pytorch/pytorch.git 196 
&& cd pytorch 
&& git checkout 4eb448a051a1421de1dda9bd2ddfb34396eb7287 
&& TORCH_CUDA_ARCH_LIST=“3.5 5.2 6.0 6.1+PTX” 
TORCH_NVCC_FLAGS="-Xfatbin -compress-all" 
python setup.py 96 install 
&& rm -rf pytorch
Build torch-vision from source
RUN git clone https://github.com/pytorch/vision.git 287 
&& cd vision 
&& git checkout 83263d8571c9cdd46f250a7986a5219ed29d19a1 
&& python setup.py 96 install 
&& rm -rf vision