Cuda not available - Cuda 10.0, Driver Version 410.129, Pytorch 1.4.0

Hello. I am having trouble getting Pytorch to detect my GPUs. It was detecting them previously with CUDA 9.0, but after upgrading to CUDA 10.0 it’s not working. From what I’ve read my driver version is high enough for CUDA 10.0. Here is output from a system environment script:

Collecting environment information…
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.0

OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu116.04ppa1) 7.4.0
CMake version: version 3.17.0-rc1

Python version: 3.7
Is CUDA available: No
CUDA runtime version: Could not collect
GPU models and configuration:

Nvidia driver version: 410.129
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.17.1
[conda] blas 1.0 mkl
[conda] mkl 2020.0 166
[conda] mkl-service 2.3.0 py37he904b0f_0
[conda] mkl_fft 1.0.15 py37ha843d7b_0
[conda] mkl_random 1.1.0 py37hd6b4f25_0
[conda] pytorch 1.4.0 py3.7_cuda10.0.130_cudnn7.6.3_0 pytorch

Process finished with exit code 0

Is there something obviously wrong here?


Did you restart your machine after updating the driver?
Are other applications able to use your GPU?
How did you install PyTorch? Did you build it from source or install the binaries?

Updating to a newer nvidia-driver (430.64) and restarting fixed it. Thanks.