当前位置:网站首页>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

Data collection

Seaborn Brief

SQL cross database injection

Qiming cloud sharing | demonstrate the switch through an example of the matter protocol to control the light on and off through the matter protocol

【LDA】EM变分推理 粗略版笔记【待完善

Preparation of service for robot moving forward and rotating

函数相关事项

掌门教育被强制退市:上市仅一年时间 软银CMC损失惨重

3D reconstruction system | L3 dual view motion recovery structure (SFM binocular SFM)
随机推荐
Phpstudy indicates that the hosts file may not exist or be blocked from being opened. How to resolve the failure of synchronizing hosts
Chapter I exercises of program construction and interpretation
启明智显分享| 2.8寸手持中控屏应用方案
ADSL
Xshell 7 official website free download
USART(RS232422485)、I2C、SPI、CAN、USB总线
Rust tip - running the tensorrt model through FFI programming
模块八
Browser fingerprint interpretation
About layoffs in Internet companies
Data collection
Tensorrt based in-depth learning model deployment practice tutorial!
Function related matters
Scala下载及IDEA安装Scala插件(保姆级教程超详细)
The difference and brief description of "file name" and < file name > import header file used in # include
Leetcode daily question - fair candy bar exchange
[spark][core] interview questions talk about push based shuffle
The igatewayloadbalancer interface implements routing. Otherwise, it follows Sid routing
Solution to the new database prompt on the pagoda panel that the database name cannot be greater than 16 bits
3D reconstruction system | L3 incremental motion recovery structure (incremental SFM)