Disclaimer: This blog post, code word one morning, no reprint, thanks for respect and understanding


The reason for installing CUDa11.2


why

Basic conditions

The current Cuda kernel Version is high enough for ordinary users to install their own Cuda Version: 11.2.0Nvidia-smi Nvidia-SMI 460.80 Driver Version: 460.80 CUDA Version: 11.2Copy the code

Why did you write this blog post

There are significant differences between the Linux server installation interface and the previous version of Cuda, and it’s worth noting again

Why Denver

Moved by the operation, said to give me a tea pot


Download the installation package


Developer.nvidia.com/cuda-11.2.0…

Server installation package download command:

 wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux.run

Copy the code

May be need to chmod 755 for file

Chmod 755 cuda_11. 2.0 _460. 27.04 _linux. RunCopy the code

My proper installation graphic tutorial

I only have Cuda ToolKit installed; Drivers, documents, have chosen not to install

. / cuda_11. 2.0 _460. 27.04 _linux. RunCopy the code

Press Options and press Enter to enter the following screen

The first line Change.. Press Enter to set the installation path

The following output is displayed:


Configure Cuda environment variables for the current user

Cuda environment variables are configured

# return to user root
cd 
vim .bashrc

The configuration is as follows

exportPATH = / principle/usr/home/ink mycuda/bin:$PATH
exportLD_LIBRARY_PATH = reason/usr/home/ink/mycuda/lib64:$LD_LIBRARY_PATH
exportCUDA_HOME = / usr/mycuda/home/inkMake the configuration take effect
 . .bashrc
Copy the code

Check the Cuda version. It has changed

nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Mon_Nov_30_19:08:53_PST_2020 Cuda Compilation tools, release 11.2, V11.2.67 Build cuda_11. 2. R11.2 / compiler. 29373293 _0Copy the code

Installation process, common may be confused record


CuDNN V8.1.0 download

Download link

Developer.nvidia.com/rdp/cudnn-a…

Once you want to download it, you’re asked to log in to your account

For new users, you need an email to register your NVIDIA account. Ordinary email can be registered (163, Penguin), I use my own Hu Ge email for registration;

Choose to download, suitable for your server type

I have downloaded my own good share here, the only request, please do not spread my cloud disk link

Link: https://pan.baidu.com/s/1WO2aKZsJ-oWefQMHClygKQ extraction code: moliCopy the code


CuDNN V8.1.0 configuration

Unpack the

The tar - ZXVF cudnn - 11.2 - Linux - x64 - v8.1.0.77. TGZ# Decompress to obtain cuda/ directory

cat cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2

#define CUDNN_MAJOR 8
#define CUDNN_MINOR 1
#define CUDNN_PATCHLEVEL 0
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#endif /* CUDNN_VERSION_H */

Copy the code

The following basic configuration encountered header dependency issues in the project

# change cudnn.h permissions
chmod a+r cuda/include/cudnn.h

# cp files to the installed CUDA directoryH /home/ Murray /usr/mycuda/include/ cp cuda/lib64/libcudnn.s* /home/ Murray /usr/mycuda/lib64/Copy the code

The final decision was to install Cudnn directly as a folder overlay

cdRichard/usr/home/ink/mycuda/lib64 ~ / usr/mycuda/lib64 $cp/home/ink principle/softpackage cudnn/cuda/lib64 / *. ~ / usr/mycuda/lib64 $cd. / include ~ / usr/mycuda bedding/include $cp/home/ink/softpackage/cudnn/cuda/include / *.Copy the code

Thank you