Linux system configuration deep learning environment - install nvidia driver (1)

Description: Single system; unbantu22.04; NVIDIA GeForce RTX 2080Ti

Foreword:

A few days ago, it took about a day and a half to configure the deep learning environment for the newly installed system unbantu22.04. The approximate steps are as follows:
(1) Install NVIDIA driver
(2) Install cuda+cudnn
(3) Install Anconda
(4) Install Pycharm
(5) conda installs the deep learning framework it needs, and imports the environment on Pycharm. (I use Pytorch)
At that time, most of the time was spent on the first step. I tried many methods on the Internet without success, and finally installed it successfully by a coincidence. In fact, I have tried this method before, but it has been failing. In the end, I don’t know why it succeeded again. This may be metaphysics and cannot be explained by science. The rest of the steps are relatively smooth.
This article mainly talks about the installation of NVIDIA drivers. The article will talk about 2 methods, and I succeeded with the second method. When you try the first method and it still doesn't work, then you are probably the same as me, and I suggest you try the second method.
Note: driver version>=cuda version>=pytorch version

1. Method 1

The first method I use is to install it directly in the application that comes with Unbantu (Software and Updates -> Additional Drivers). This method is the easiest. At that time, I was prompted to restart after the installation. After restarting, the screen was black. After reading some opinions on the Internet, it may be that the NVIDIA driver conflicts with the graphics card driver nouveau that comes with the Linux system. It is harmful, and then I found a way to delete the NVIDIA driver online , which successfully booted; then first disabled the nouveau driver, and then installed the NVIDIA driver, and it showed that the nvidia-smi input was not successful after the installation was successful.
Of course, this method can be tried. Some students around me have successfully installed it. It is recommended to disable the nouveau driver first, do not restart immediately, otherwise it may turn on a black screen, and then successfully install the NVIDIA driver in the software and update, and finally restart, it may be successful.

Please add a picture description![Please add a picture description](https://img-blog.csdnimg.cn/152656e9f21b4a28bca7aab8d1dd8fda.pngPlease add a picture description

2. Method 2

The second method is to download and install on the NVIDIA official website, you can read this article:

https://blog.csdn.net/my__blog/article/details/125693175?ops_request_misc=&request_id=&biz_id=102&utm_term

But I still haven't installed it successfully. But it seems to be half the battle.

Error: nvidia-smi no devices were found

The solution is as follows:
terminal input:

ubuntu-drivers devices

Please add a picture description
Then choose the driver you want to install, I installed vidia-driver-525

sudo apt-get install nvidia-driver-525

final entry
nvidia-smicheck
Please add a picture description

That's it! ! !

Guess you like

Origin blog.csdn.net/qq_45160840/article/details/130020078