Pytorch connects to cuda8 instead of cuda9

I have a question to ask.

I have a dockerfile witjh :

Install Pytorch Instructions at http://pytorch.org/

RUN conda install -y pytorch torchvision cuda90 -c pytorch
RUN conda install -y opencv

I notice that even so, pytorch uses cuda 8 and not cuda 9 (inside the container, whose image was just built)

ipython
import torch
torch.version.cuda .      // 8.0.61

outside the container, the same 3 lines do correctly give 9.0.176

How do I get pytorch to install with cuda 8? The setup is AWS p3.8xlarge AMI (Conda)

thank you,

Could you check the log from your docker container to see which version was selected to be installed?
Do you also have CUDA8 using python instead of ipython?
Could it be multiple PyTorch versions were installed?

using
RUN conda install -y pytorch torchvision cuda92 -c pytorch

instead of RUN conda install -y pytorch torchvision cuda90 -c pytorch

does get pytorch to switch. For some reason, cuda90 is non-sticky … not sure why …

thank you ptrblck, I really appreciate your tips/help.

1 Like