0

I am trying to install Cuda 11.3 (since i understand this is the most stable one and any version after leads to compatibility issues). I have Ubuntu 22.04 LTS and I followed these instructions: https://developer.nvidia.com/cuda-11-3-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_local

When I enter all the commands I do nvidia-smi and I get this:

| NVIDIA-SMI 520.61.05    Driver Version: 520.61.05    CUDA Version: 11.8     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
|  0%   37C    P8     8W / 220W |     99MiB /  8192MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1245      G   /usr/lib/xorg/Xorg                 86MiB |
|    0   N/A  N/A      1498      G   /usr/bin/gnome-shell               10MiB |
+-----------------------------------------------------------------------------+

But when I do nvcc --version it returns Command 'nvcc' not found, but can be installed with: sudo apt install nvidia-cuda-toolkit. If I run the install command for nvidia-cuda-toolkit the nvidia-smi command stops working and when I test if cuda is being used with pytorch, I keep getting torch.cuda.is_available() as False.

I did sudo ubuntu-drivers autoinstall to install the drivers and nothing changed. The weird part is that in my base conda enviornment, torch.cuda.is_available() returns true. I would really appreciate it if anyone could help out.

Thanks!

1 Answer 1

0

I had the same issue after updating to Ubuntu 22.04. Following instructions from https://pytorch.org/ I went with cuda 11.6 even though my nvidia-smi gave the Cuda Version as 11.7

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 515.76 Driver Version: 515.76 CUDA Version: 11.7 | |-------------------------------+----------------------+--------------------

NOTE: 'conda-forge' channel is required for cudatoolkit 11.6

conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge

python version for my conda environment is Python 3.10.6

Doesn't look like cuda driver version at operating system level has an impact on with cudatoolkit packaged with pytorch

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .