Recently, accelerated CUDA is needed in code learning, so I will talk about the detailed usage process here.
1. Go to the CUDA official website to download
2. Choose the version you need
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.runsudo sh
cuda_11.1.0_455.23.05_linux.run
Use the above two commands to download and install, follow the tutorial during installation, you need to manually enter accept
3. An error occurred during installation
Installation failed. See log at /var/log/cuda-installer.log for details.
Cancel the first two items of the installation option, and the installation can be successful.
This refers to not installing the graphics card driver that comes with the cuda installation package. I think it may already have a driver.
4. Successful installation
5. Modify the environment variables.
Enter the gedit ~/.bashrc command to open the file, enter the following statement at the end of the file, and save.
export PATH=/usr/local/cuda-11.1/binKaTeX parse error: Expected '}', got 'EOF' at end of input: {PATH:+:{PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64KaTeX parse error: Expected '}', got 'EOF' at end of input: …LIBRARY_PATH:+:{LD_LIBRARY_PATH}}
Enter source ~/.bashrc to save
6. Check whether the installation is successful.
Use nvcc -V to test whether Cuda can be detected. The following message is successful
Reference:
Blank machine installation
failed method
wget failed breakpoint
wget failed
CUDA official installation guide
CUDA usage guide
tutorial
toolkit version