CUDA installation download cuda Enter the nvidia-smi command to view the supported cuda version If you cannot view it, it means that the nvidia driver has not been installed. Click Additional Driver, select the corresponding version of the driver and it will be automatically downloaded. Download the corresponding version of cuda from https://developer.nvidia.com/cuda-toolkit-archive and select the 18.04 version. gcc downgrade The gcc version that comes with Ubuntu 20.04 is 9.7.0. You need to add gcc7 to install cuda10.2. Enter the command to install gcc7 apt-get install gcc-7 g++-7 Check the gcc version and you can see that there are two versions, 7 and 9, in the system. Use update-alternatives to switch versions and enter the following command: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 50 At this time, enter the sudo update-alternatives --config gcc command to view the default version of gcc. You can see that the current default gcc version is 7, which means the switch is successful. Install CUDA Enter the command to install sudo sh cuda_10.2.89_440.33.01_linux.run Click continue Enter accept The cuda installation package comes with its own graphics driver, so in this step, press the space bar to remove the option to install the graphics driver, and then select install Configuring environment variables Enter the gedit ~/.bashrc command to open the file, enter the following statement at the end of the file, and save it. export PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} Update environment variable configuration source ~/.bashrc At this point, the cuda installation is complete. Enter the nvcc -V command to view the cuda information Install cuDNN Download the corresponding version of cudnn from https://developer.nvidia.com/cudnn. You need to log in. After downloading and decompressing, copy the cuda/include/cudnn.h file to the usr/local/cuda/include folder, copy all files under cuda/lib64/ to the /usr/local/cuda/lib64 folder, and add read permissions: sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn* At this point, cuDNN installation is complete This is the end of this article about Ubuntu 20.04 CUDA&cuDNN installation method (graphic tutorial). For more information about Ubuntu 20.04 CUDA&cuDNN installation, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Example of disabling browser cache configuration in Vue project
Use CSS3 to animate the input box similar to the ...
1. WebDesignerWall 2. Veerle's Blog 3. Tutori...
1. TCP Wrappers Overview TCP Wrappers "wraps...
Integrity constraints Integrity constraints are f...
1. Install ffmpeg under centos linux 1. Download ...
What is a selector? The role of the selector is t...
The installation tutorial of mysql5.7.17 is share...
After configuring the tabBar in the WeChat applet...
Due to the default bridge network, the IP address...
<br /> This article is translated from allwe...
In the process of learning web design, I did not ...
1. Log in to MySQL database mysql -u root -p View...
border-radius: CSS3 rounded corners Syntax: borde...
Basic Concepts Before operation, you must first u...
Table of contents 1. Task Queue 2. To explain som...