**1. Download cuda10.1: **
Nvidia official website link: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal
2. Installation 10.1:
[Note]: cuda8.0, cuda9.0, cuda10 all integrate nvidia graphics driver. According to whether the graphics driver is installed at the same time as cuda is installed, it can be divided into installation method without driver and installation method with driver.
The installation method without driver is used here, because the latest nvidia graphics card driver has been successfully installed in the front;
Execute the following command
sudo sh cuda_10.1.168_418.67_linux.run
Enter accept
Select the installation option: do not select the driver,
or:
Then press the Enter key with the corner of a book until the terms of service display to 100%. Then select according to the following steps:
accept
n (don't install driver)
y
y
y
Set cuda environment variables
Enter sudo gedit ~/.bashrc to open the .bashrc file in the home directory and add the following path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64
export PATH=$PATH:/usr/local/cuda-10.1/bin
export CUDA_HOME=$CUDA_HOME:/usr/local/cuda-10.1
Terminal operation: source ~/.bashrc to make it effective;
Check whether the installation is successful:
Enter nvcc -version, if the following text is displayed, the installation is successful:
Reference article:
Recommended Posts