当前位置:网站首页>Deepin20.6 RTX3080 安裝顯卡驅動510.60.02、CUDA11.6、PyTorch1.11
Deepin20.6 RTX3080 安裝顯卡驅動510.60.02、CUDA11.6、PyTorch1.11
2022-06-12 15:08:00 【first_Dance】
Deepin20.6 RTX3080 安裝顯卡驅動510.60.02、CUDA11.6、PyTorch1.11
0 前言
近期有個目標檢測的任務,需要使用CUDA訓練網絡模型,使用的設備是RTX3080,在Deepin操作系統下,安裝了510.60.02版本的驅動,簡單記錄下操作步驟,以備不時之需
1 准備工作
網上有很多帖子是通過英偉達官網下載.run格式的驅動來手工安裝的,但是我嘗試了很多版本,雖然能裝上,但是裝完之後無法開機,因此,在開始安裝顯卡驅動可CUDA套件前,建議先備份一下當前的操作系統
2 清理環境
卸載當前已經安裝的英偉達驅動
sudo apt autoremove nvidia*
屏蔽開源驅動
sudo vi /etc/modprobe.d/blacklist.conf
按i進入vi的編輯模式,添加以下幾行內容,然後ESC進入命令模式wq進行保存
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
如果開機卡黑屏,或者開機有如下警告
nvidiafb: cannot request PCI regions
可以在上述文件中多添加一行
blacklist nvidiafb
文件保存成功後,執行下面的命令,完成內核模塊的屏蔽
sudo update-initramfs -u
重啟機器,使用下面的命令檢查,沒有輸出就屏蔽成功了
lsmod | grep nouveau
3 安裝顯卡驅動
不知道是Deepin的系統原因還是我臺式機的原因,英偉達官網.run形式的驅動文件我裝不成功,裝上以後開機卡黑屏,然後在Deepin官方倉庫裏找到了可以直接使用的driver…
sudo apt search nvidia-driver
...
...
glx-alternative-nvidia/未知,now 1.2.0-1-1+eagle amd64 [已安裝,自動]
allows the selection of NVIDIA as GLX provider
libegl-nvidia0/未知,now 510.60.02-1 amd64 [已安裝,自動]
NVIDIA binary EGL library
...
...
喜出望外,直接install,一把梭哈,成功!
sudo apt install nvidia-driver
# 命令執行完成後 檢查是否成功 成功的話 nvidia-smi會有顯卡信息輸出
nvidia-smi
4 安裝PyTorch & CudaToolKit
我安裝的510.60.02版本自帶的CUDA版本是11.6,在pytorch官網可以看到,當前最新PyTorch Stable版本是1.11.0,支持CUDA 11.3,CUDA11系列向下兼容低版本,選擇自己的安裝方式安裝PyTorch 1.11.0即可,下方會有安裝命令,貼終端跑一下完事,(記得更換conda或者pip到國內源,快一些)
conda安裝
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
pip安裝
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

5 檢查
終端輸入python or python3,進入python交互環境,檢查下PyTorch和CUDA的版本,以及CUDA是否可用,至此,Deepin20.6+RTX3080安裝顯卡驅動、PyTorch、CUDA工作完成
>>> import torch
>>> torch.__version__
'1.11.0+cu113'
>>> torch.cuda.is_available()
True
>>> torch.version.cuda
'11.3'
>>>
边栏推荐
- Xshell 7 official website free download
- ROS 中 boost::bind( ) 的使用
- Rust tip - running the tensorrt model through FFI programming
- PHPstudy建站提示hosts文件可能不存在或被阻止打开,同步hosts失败怎么解决
- TC menu split
- Ngork implements intranet penetration -- free
- 机器人前行、旋转的service编写
- 【Environment】1. Get the configuration in YML through the environment in the configuration class
- [system. Currenttimemillis()] current timestamp: the number of milliseconds that have elapsed since the current system time was 0:00:00 on January 1, 1970
- IMU learning records
猜你喜欢
![[LDA] basic knowledge notes - mainly AE and VAE](/img/1c/ccc073cac79b139becd5de0b9a91b1.png)
[LDA] basic knowledge notes - mainly AE and VAE

IMU learning records

Getting started with webdriver

3D reconstruction system | L3 dual view motion recovery structure (SFM binocular SFM)

ROS初学者编写小乌龟以一定速度旋转一定角度的server

ROS beginners write the server that the little turtle rotates a certain angle at a certain speed

C main函数

Pta: self test -3 array element cyclic right shift problem (20 points)

Tcp/ip three handshakes and four waves (interview questions)

增加mysql的最大连接数
随机推荐
增加mysql的最大连接数
ARM 64指令小记
【Environment】1. Get the configuration in YML through the environment in the configuration class
Scala下载及IDEA安装Scala插件(保姆级教程超详细)
[wp][beginner level] attack and defense world game
C string
Rust小技巧 - 通过FFI编程运行tensorrt模型
The process of generating strong association rules from frequent itemsets
Pta: self test -3 array element cyclic right shift problem (20 points)
The difference and brief description of "file name" and < file name > import header file used in # include
Seaborn的简述
Data collection
IMU learning records
JUnit exception, a method that asserts that the exception information is not empty
Xshell 7 official website free download
First set and follow set in vernacular
Ngork implements intranet penetration -- free
Solution to the new database prompt on the pagoda panel that the database name cannot be greater than 16 bits
产业端:618的新战场
浏览器指纹解读