1
votes

I am trying to change my environment path variables so Pytorch can access CUDA. According to nvidia-smi, the driver can support CUDA 10.0. CUDA 10.0 is already installed on the server. I modified my bash_profile according to these instructions.

export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\{LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

nvcc shows the CUDA version. However, Pytorch still does not detect CUDA.

Is there some solution? I am a non-root user.

1
nvidia-smi doesn't tell you what CUDA version of installed, only what the version your driver has maximum support fortalonmies
Thanks for the additional info! I will revise my post.John Doe

1 Answers

0
votes

I suggest to try echo $LD_LIBRARY_PATH in your terminal to see if the path was successfully set. For me I have to log out and log back in every time I set anything in .bashrc for it to take effect.

Another time I encountered a similar issue was I had another version of CUDA in the path and I had to remove it.

Hope this helps.