Installing cuDNN and CUDA Toolkit on Ubuntu 20.04 for Machine Learning Tasks

Rahul Bhadani
Geek Culture
Published in
4 min readMay 3, 2021

--

Image by the author. Z = Y⁶— X⁶

It is always convoluted and challenging to install a CUDA toolkit and library that needs to interact with your NVIDIA GPU on an Ubuntu machine. However, if done right, the CUDA toolkit with your NVIDIA GPU can be a great tool that can harness the power of GPU to produce fast applications.

Basic Requirements

The basic requirement for following instructions in this article is a computer with Ubuntu 20.04 installed with an NVIDIA GPU. In my case, it was NVIDIA GeForce GTX 1650 Ti.

Further, at the time of writing this article, I installed the latest version of the CUDA toolkit which was CUDA Toolkit 11.3.

The other requirement is the NVIDIA developer account that can be obtained at https://developer.nvidia.com/login free of charge.

CUDA Toolkit Installation

I decided to install a .deb file of the CUDA toolkit following the instruction I reproduced below:

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

--

--

Rahul Bhadani
Geek Culture

Asst. Professor, @UAH | @uarizona PhD, ECE | Intelligent Transportation & Quantum Science Researcher | Donation: https://www.buymeacoffee.com/rahulbhadani