Installing CUDA driver for NVIDIA GPU in Ubuntu 20.04

First download CUDA driver from here: https://developer.nvidia.com/cuda-downloads

Choose operating system (Linux), architecture (x86_64), distribution (Ubuntu), Version (20.04), Installer type (deb (local)).

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=2004&target_type=deblocal

Then follow the instruction:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda-repo-ubuntu2004-11-2-local_11.2.2-460.32.03-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-2-local_11.2.2-460.32.03-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-2-local/7fa2af80.pub
sudo apt-get updatesudo apt-get -y install cuda

Leave a Reply

Your email address will not be published. Required fields are marked *