Where is CUDAToolKit path when installed via conda?

I installed my PyTorch 1.0 using the command conda install pytorch torchvision cudatoolkit=9.0 -c pytorch while my system has an existing cudatoolkit already, which causes a CUDA version mismatch in my current application. I am using Ubuntu 18.

I am wondering where can I find the cudatoolkit installed via the above conda command? Specifically, I am looking for: cuda/bin , cuda/include and cuda/lib64 in $PATH , $CPATH and $LD_LIBRARY_PATH respectively.

2 Likes

The shipped CUDA libraries in the PyTorch binaries should not create any conflicts with your system-wide CUDA install.
What kind of version mismatch do you get?

1 Like

Thanks for the quick reply!

I was trying to install the library pytorch geometric on a server (without root access).

I have the situation detailed in this comment.

In short, the problem was that my system has already installed a cudatoolkit, but when installing pytorch with conda, a second cudatoolkit was installed (different toolkit versions). Then, when I install pytorch geometric, I have to specify the PATH of my toolkit, but I can only find the system-installed toolkit path instead of the conda-installed toolkit path.

Therefore, I am looking for the conda-installed toolkit path to make sure pytorch geometric uses the correct cudatoolkit.

The PyTorch binaries do not ship with nvcc, so you won’t be able to compile other libraries with it.
The solution would be to install the same CUDA version locally on your machine as is used by PyTorch or build PyTorch and the other lib from source using your system-wise CUDA install.

1 Like

Thanks for the reply!

However, in my case, I don’t have root access. I am wondering if it is possible to still use conda to install pytorch but specify the cudatoolkit as 9.2.148?

I tried conda install pytorch torchvision cudatoolkit=9.2 -c pytorch, but get

>>> torch.version.cuda

'9.0.176'

Is building from source not an option?
If so, could you run a docker container with e.g. CUDA10.0 and install pytorch using the same version?