anibali/docker-pytorch

Question about pytorch package naming and source

slothkong opened this issue · 2 comments

Thanks for taking the initiative and putting up this repo. Very helpful!

I have been looking for an easy way to put pytorch in a container and your approach is interesting, in specific the lines used to install the pytorch related packages. For example, for the CUDA 10 Dockerfile you run conda install for:

pytorch=1.2.0=py3.6_cuda10.0.130_cudnn7.6.2_0

I havent found this package name in the pytorch docs nor is it a typical package name ( = symbol shows twice?). Where is this package coming? Does it install cudnn as well?

Also I was supper amazed that you start with the base build of nvidia/cuda and not the devel, which is common one. Unfortunately, after everything gets installed the resulting image is around 2.8 GB, which is very similar to another pytorch images that use the devel flavor of nvidia/cuda, so not much is saved in terms of image size. Why is that?

  1. Conda actually allows variants of versions. You can see this yourself by running conda search -c pytorch pytorch=1.2.0 (all variants of PyTorch 1.2.0 will be printed). This allows you to pick the package for the version of CuDNN and Python that you want.

  2. My image contains a few extras, like OpenCV and Graphviz, which do take up some space. I'm not sure which image you're comparing to, but maybe they don't have as many extras in there?

Yes, I see now conda search does the trick. I am note familiar with conda so probably that is why I couldn't find the package source. And this particular set of conda packages do come with cudnn included. Cool! Is just strange that the official docs don't mention this.