ubuntu16 CUDA cuDNN installation summary

ubuntu16 CUDA installation summary

There is a search function in the upper right corner of the Nvidia official website, which makes it easy to find related functions and obtain information, such as searching for CUDA and cuDNN.

CUDA installation

Go to the CUDA download page through various links from the nvidia official website: https://developer.nvidia.com/cuda-downloads

Get the installation method by clicking on the options such as the operating system. It is recommended to choose the runfile installation method. After downloading the installation file, you can enter the installation document through the documentation in the lower left corner of the above picture. If you need to install an old version of CUDA, you can view the historically released version on the top right of the tutorial.

The installation document mainly contains the following parts:

  • Table 2: Verification operations before installation, such as whether it is compatible with CUDA, download the previous CUDA
  • 4 in the directory: Because the runfile installation method is used here, just jump to 4
  • 6 in the directory: configuration work after installation, mainly adding library paths and the like

However, compared to using the detailed installation tutorial above, it is easier to directly use the concise tutorial Quick Start Guide in the first line of directory 4.

Concise tutorial

Enter the concise tutorial, select the specified operating system, here select ubuntu

Follow the above operations and finally pass the verification.

Precautions:

  • Step 6: Modifying environment variables is only temporary. If you need to modify it permanently, you can add it at the end of the .bashrc file in the current user directory. Don't forget to use source.bashrc to update the current environment after modification

Solutions to common problems

  • The second step: sudo reboot && init 3
  • update-initramfs: command not found:执行 sudo apt-get install initramfs-tools
  • Prompt libGLU.so not found when make nbody: search for libGLU installation corresponding so in the installation tutorial.
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \
    libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
  • make nbody prompts /usr/bin/ld: cannot find -lGL: Check whether the link file of libGL.so under /usr/lib/x86_64-linux-gnu/ is wrong, and you can modify it

cuDNN installation

cuDNN is a GPU acceleration library customized by Nvidia for deep learning. I still find cuDNN on the official website through Deep Learning and Deep Learning Software: https://developer.nvidia.com/cudnn . Then click Download cuDnn to enter the download page (requires a registered account and login).

The hyperlink Deep Learning SDK Documentation above the selected version has detailed documentation. Of course, the previous Installation Guide gives a concise installation document.

Find the introduction of Linux installation from the concise tutorial. According to your situation, you can choose to download Tar file or Debian file for installation. Debian file is recommended.

Finally, verify that the installation was successful. It should be noted that the Tar file installation method does not seem to be a test case, so the Debian file installation method is still recommended. Of course, it is not necessary to perform the following test.

Guess you like

Origin blog.csdn.net/a40850273/article/details/107281418