cuda and cudnn installation tutorial

cuda installation

cuda version view: cat /usr/local/cuda/version.txt

CUDA download page: CUDA Toolkit Archive | NVIDIA Developer

450.57 chose cuda-11.0. It is recommended to use run or local rpm installation, and the matching version will be installed. Remote rpm installation will install the latest version.

The download interface has the corresponding yum source configuration code.

If the local rpm is configured, execute the following command directly to install it (nvidia driver will be installed automatically):

sudo yum -y install cuda //Just enter this command, and other dependencies such as cuda-driver and nvidia driver will be downloaded automatically

If it is installed using the run file (you can choose not to install the nvidia driver):

Run cuda_10.0.130_410.48_linux.run, choose not to install the recommended driver, not to install opengl, and install samples. Generated directory:/usr/local/cuda-10.0/, samples directory/root,

Create a soft link /usr/local/cuda/

Correspondence between graphics card driver and cuda version:

Uninstall cuda (need to restart the computer):

Yum remove nvidia-*

yum remove cuda

rm -rf /usr/local/cuda-10.0

cudnn installation

Check cudnn version: cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

cudnn download address: (requires login)

https://developer.nvidia.com/rdp/cudnn-download

Choose the version corresponding to cuda

For example, download cudnn-10.0-linux-x64-v7.6.5.32.tgz

After decompression, cp cuda/include/cudnn.h /usr/local/cuda/include/

cp cuda/lib64/libcudnn* /usr/local/cuda/lib64/

Set the above file permissions to be readable by everyone:

chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

Guess you like

Origin blog.csdn.net/qq_42152032/article/details/131342194