当前位置:网站首页>Deepin20.6 rtx3080 installing graphics card drivers 510.60.02, cuda11.6, pytorch1.11

Deepin20.6 rtx3080 installing graphics card drivers 510.60.02, cuda11.6, pytorch1.11

2022-06-12 15:09:00 first_ Dance

Deepin20.6 RTX3080 Install the video card driver 510.60.02、CUDA11.6、PyTorch1.11

0 Preface

Recently, there is a task of target detection , Need to use CUDA Training network models , The equipment used is RTX3080, stay Deepin Under the operating system , Installed 510.60.02 Version of the driver , Simply record the operation steps , For a rainy day

1 preparation

Many posts on the Internet are downloaded through NVIDIA's official website .run Format driver to install manually , But I tried many versions , Although it can be equipped with , But you can't start the machine after installation , therefore , At the beginning of installing the graphics card driver, you can CUDA Before Kit , It is recommended to back up the current operating system first

2 Clean up the environment

Uninstall the currently installed NVIDIA driver

sudo apt autoremove nvidia*

Shielding open source drivers

sudo vi /etc/modprobe.d/blacklist.conf

Press i Get into vi The editing mode of , Add the following lines , then ESC Enter command mode wq Preservation

blacklist nouveau   
blacklist lbm-nouveau   
options nouveau modeset=0 
alias nouveau off   
alias lbm-nouveau off

If the boot card is blank , Or there are the following warnings when starting up

nvidiafb: cannot request PCI regions

You can add one more line to the above file

blacklist nvidiafb

After the file is saved successfully , Execute the following command , Complete the shielding of kernel modules

sudo update-initramfs -u

Restart the machine , Use the following command to check , Shielding is successful without output

lsmod | grep nouveau  

3 Install the video card driver

I don't know. Deepin The system or my desktop , NVIDIA website .run I can't install the driver file in the form of , After installing the boot card, the screen will be blank , And then in Deepin It can be used directly in the official warehouse driver…

sudo apt search nvidia-driver
...
...
glx-alternative-nvidia/ Unknown ,now 1.2.0-1-1+eagle amd64 [ already installed , Automatically ]
  allows the selection of NVIDIA as GLX provider
libegl-nvidia0/ Unknown ,now 510.60.02-1 amd64 [ already installed , Automatically ]
  NVIDIA binary EGL library
...
...

Pleasantly surprised , direct install, A poker , success !

sudo apt install nvidia-driver
#  After command execution   Check for success   If you succeed  nvidia-smi There will be video card information output 
nvidia-smi

4 install PyTorch & CudaToolKit

I installed 510.60.02 Version comes with CUDA The version is 11.6, stay pytorch Official website You can see , Current latest PyTorch Stable The version is 1.11.0, Support CUDA 11.3,CUDA11 Series downward compatible with lower versions , Choose your own installation method to install PyTorch 1.11.0 that will do , There will be installation commands below , Stick to the terminal and run for a while ,( Remember to replace conda perhaps pip To domestic sources , faster )

conda install

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

pip install

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

 choice PyTorch edition

5 Check

The input terminal python or python3, Get into python Interactive environment , Check PyTorch and CUDA Version of , as well as CUDA Is it available , thus ,Deepin20.6+RTX3080 Install the video card driver 、PyTorch、CUDA completion of jobs

>>> import torch
>>> torch.__version__
'1.11.0+cu113'
>>> torch.cuda.is_available()
True
>>> torch.version.cuda
'11.3'
>>> 
原网站

版权声明
本文为[first_ Dance]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121507568681.html