Pre-installation preparation The main purpose of CUDA is deep learning, and the current mainstream deep learning framework Tensorflow2 supports up to CUDA 10.1. Therefore, this article explains the main process of installing CUDA 10.1 on Ubuntu 20.04 system. First, check whether your NVIDIA graphics card driver supports cuda10.1 version. If the version number of CUDA Version: ... is greater than or equal to 10.1 (mine is 10.2), you can install cuda10.1. Key point: gcc downgrade Because the gcc version that comes with Ubuntu 20.04 is 9.3, and cuda 10.1 does not support gcc-9, gcc-7 must be installed manually. The command is as follows: sudo apt-get install gcc-7 g++-7 After installing gcc-7, there are two versions of gcc in the system, so to set the default gcc, the command is as follows: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1 This command can set the priority of each version of gcc through update-alternatives. The highest priority is the system default version. The following command can be used to display its priority: sudo update-alternatives --display gcc The same is true for setting the default g++: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 9 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 1 Display g++ priority: sudo update-alternatives --display g++ Download and install CUDA 10.1 according to the installation steps on the official website CUDA Toolkit 10.1 update2 Archive As shown in the figure above, it is recommended to choose the run file installation, which is relatively simple.
Move to the Install option, press Enter, and wait for the installation to complete. Configure executable file and library path After the installation is complete, you need to configure the environment for CUDA 10.1. First open the .bashrc file in your home directory: Add the following to the end of the file: export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} Save and close the file to complete the configuration. Update the environment: Install cuDNN Download cuDNN Download cuDNN After opening the link, the website will ask you to log in. If you don’t have an NVIDIA account, register and then log in. Select the version corresponding to CUDA 10.1 (7.6.5), click it, select cuDNN Library for Linux, and click Download. (It is best to choose cuDNN Library for Linux as this file format is easier to install) Install cuDNN Switch to the directory where the downloaded file is located and unzip the downloaded cuDNN compressed file to the current directory: tar zxvf ./cudnn-10.1-linux-x64-v7.6.5.32.tgz -C ./ Decompress the 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 Add read and execute permissions to the above files: sudo chmod 755 /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn* Installation complete References: How to install CUDA and cuDNN on Ubuntu 20.04 This is the end of this article about the steps to install cuda10.1 on Ubuntu20.04 (graphic tutorial). For more information about installing cuda10.1 on Ubuntu20.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Solution to the problem that Navicat cannot remotely connect to MySql server
>>: Detailed explanation of MySQL transactions and MySQL logs
Spring integration with springmvc The web.xml con...
Recently, I encountered a requirement to display ...
HTML tags have special tags to handle the title of...
Before hiding: After hiding: CSS: Copy code The co...
1. Write a simple Java program public class tests...
1. Common MySQL configuration All the following c...
1. Download from official website: https://dev.my...
Look at the code: Copy code The code is as follows...
Result: Implementation code: html <div class=&...
Before talking about data responsiveness, we need...
1. Nginx installation steps 1.1 Official website ...
Preface The blogger uses the idea IDE. Because th...
As we all know, the web pages, websites or web pag...
Table of contents 1. Retrieve the image 2. Create...
Table of contents Avoid using the spread operator...