Ubuntu 18.04 CUDA/cuDNN Installation
Tutorial of installing CUDA and cuDNN for Nvidia GPU.
Sep 9, 2021
Remove older version of CUDA/CuDNN
Go to /usr/local/
see if there are any cuda-x.x
folder. Then remove it with:
sudo rm -rf /usr/local/cuda-x.x/
Install CUDA
- Download from https://developer.nvidia.com/cuda-toolkit
Choose the way with your environment, last step choosedeb(local)
- Follow the instruction
In this time, like this:
- After installation complete, add below
PATH
variable to theshelrc
(bashrc) you use: [Ref]
- CUDA installed
Install CuDNN
- Download package from https://developer.nvidia.com/rdp/cudnn-archive. Select the support version of CUDA (this time I used are CUDA11.2 & cuDNN8.1.0). Then choose
cuDNN Library for Linux(x86_64)
- Extract it and copy to the right place
- Verify Version
- cuDNN installed