Installing PyTorch with older CUDA version

I am trying to install PyTorch on a cluster that has NVidia driver version 390.87 and CUDA toolkit version 9.1 installed.

It seems that to install PyTorch 1.4 we require CUDA 9.2 or 10.1, which I cannot install because I don’t have root privileges on the cluster and the admins are reluctant to upgrade the drivers for fear of breaking things.

So what are my options? Is there a way to get install PyTorch 1.4 with CUDA toolkit 9.1? Or should I install an older version of PyTorch? If so, which one and how?

If you use a pre-built binary (check https://pytorch.org/get-started/locally/) you don’t need to install CUDA on the machine.

But when I install pytorch via conda install pytorch torchvision cudatoolkit=9.2 -c pytorch, I find that torch.cuda.is_available() returns false. I guess because the driver version (390) does not support CUDA toolkit 9.2 which is required by pytorch 1.4?

yeah… You are right… Check this answer:

You could install a previous version of PyTorch that supports CUDA-9.0…

1 Like

Thanks. That seems like my issue.

Do you if it is possible to build pytorch 1.4 (or master) from source using an older CUDA version?

It should be possible and you’ll find the instructions here.
Let us know, if you encounter any issues.