The official packages do not seem up-to-date (https://packages.ubuntu.com/search?keywords=nvidia-cuda-toolkit) but using the latest cuda seems to matter when using newer hardware.
Nvidia is making packages available, but there is no guarantee that they will work well or will integrate with Ubuntu's management of nvidia drivers.
Is there an effort to create an ubuntu package in a PPA so we do not have to install manually and work out conflicts individually? (the package would handle that)
Open the terminal and remove any NVIDIA traces that you may have on your system.
Setup the correct CUDA PPA on your system.
Install CUDA 11.1 packages.
Specify the PATH to CUDA in the '.profile' file. Open the file by running
sudo nano ~/.profile
and add the following lines at the end of the file:Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.
Restart with
sudo reboot
and check the versions of the installation.CUDA:
NVIDIA driver:
libcudnn:
Thanks karel for the answer. In step 2 I faced a GPG error: "public key is not available".
I followed the comment of jtran1999 in the nvidia issue 1632 to proporly add the key and the CUDA PPA. Maybe it'll help others with the same error:
Then continued for step 3 and everything worked fine!!