Install cuda and cudnn on Ubuntu

CUDA installation:

  1. download the runfile of CUDA from NVIDIA:
  2. install it follow instructions given by NVIDIA: use the default value given by the runfile
  3. add the following to ~/.bashrc

CUDNN installation:

Download the cudnn from NVIDIA, it is a library which can boost computation speed of neural network. Untar the file and follow the following instructions

Copy cudnn.h in include to cuda/include

Copy lib files to cuda/lib64

Note that you don’t need to copy the link files

Make link files

check the links files

Check Installation

After installation, you should check whether you have successfully installed CUDA. To check that, compile the samples in CUDA home

After compiling, run deviceQuery in bin/x86_64/linux/release

If you see all the informations on GPU, it means that you have successfully installed CUDA+CUDNN