Install cuDNN Ubuntu: Quick Guide
You can install cuDNN (CUDA Deep Neural Network library) in Ubuntu by following these steps:
- First, you need to register on the NVIDIA official website and download the cuDNN compressed package at the following address: https://developer.nvidia.com/cudnn
- After the download is complete, unzip the compressed file to the specified directory, for example, unzip to the /usr/local directory.
tar -xzvf cudnn-10.0-linux-x64-v7.6.5.32.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
Note: The cudnn-10.0-linux-x64-v7.6.5.32.tgz mentioned here should be adjusted based on the specific version number and system architecture you have downloaded, so make sure to modify it accordingly.
- The file named .bashrc
- The configuration file for the Zsh shell
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
- Finally, run the following command to make the variable take effect:
source ~/.bashrc
After completing the above steps, cuDNN has been successfully installed on the system. You can check if the installation was successful, as well as the version of cuDNN and other information.