How to Install CUDA Toolkit 12.0 and cuDNN on Ubuntu

•

GPU Support

Identify the GPU that is supported.

Thank you for reading this post, don’t forget to subscribe!

Install CUDA Toolkit 12.0

Read guidance from nvidia here

Table displaying options for selecting CUDA Toolkit 12.9 downloads, including Operating System, Architecture, Distribution, Version, and Installer Type.

Install CUDNN

1. Enable the repository. The following commands enable the repository containing information about the appropriate cuDNN libraries online for Debian 11, Ubuntu 18.04, 20.04, and 22.04.

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
sudo apt-get update

2. Install the cuDNN library:

sudo apt-get install libcudnn8=8.7.0.-1+cuda11.8 sudo apt-get install libcudnn8-dev=8.7.0.-1+cuda11.8

Where:
${cudnn_version} is 8.7.0.*
${cuda_version} is cuda10.2 or cuda11.8


3. Environment Setup
Append the following lines to the end of the file ~/.bashrc:

CUDA related exports
export PATH=/usr/local/cuda-11.8/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Leave a Reply

One-Time
Monthly
Yearly

Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount

$5.00
$15.00
$100.00
$5.00
$15.00
$100.00
$5.00
$15.00
$100.00

Or enter a custom amount

$

Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly

Discover more from Therapy and Relaxation

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from Therapy and Relaxation

Subscribe now to keep reading and get access to the full archive.

Continue reading