nvidia driver和cuda版本問(wèn)題

一、查看顯卡類(lèi)型

lspci | grep -i nvidia

顯卡版本查看

二、查看顯卡對(duì)應(yīng)的驅(qū)動(dòng)版本

Download Drivers | NVIDIA

三、查看驅(qū)動(dòng)對(duì)應(yīng)的cuda版本?

Release Notes :: CUDA Toolkit Documentation

四、安裝驅(qū)動(dòng)

方式1:sudo apt-get install nvidia-430(根據(jù)自己的版本更改)

方式2:下載.run文件離線安裝

? ? ? ? ? ? ?sudo service lightdm stop

? ? ? ? ? ? ?sudo ./NVIDIA-Linux-x86_64-430.14.run

? ? ? ? ? ? ?sudo service lightdm start

五、卸載驅(qū)動(dòng)

給權(quán)限:chmod a+x NVIDIA-Linux-x86_64-418.67.run

卸載:./NVIDIA-Linux-x86_64-418.67.run --uninstall

問(wèn)題:If you plan to no longer use the NVIDIA deriver, you should make sure that no X screens are configured to use the NVIDIA X driver X driver in your X configuration file. If you used nvidia-xconfig to configure X, it may have created a backup of your original configuration. Would you like to run 'nvidia-xconfig --restore-original-backup' to attempt restoration of the original X configuration file?

回答:no

六、安裝新驅(qū)動(dòng)

1、如果出現(xiàn)錯(cuò)誤 ERROR: You appear to be running an X server; please exit X before?installing.

關(guān)閉:systemctl?stop?gdm.service??

2、查看:lsof | grep nvidia.uvm

如果不為空,關(guān)閉docker

systemctl stop docker

systemctl stop nvidia-docker.service

3、給權(quán)限:chmod a+x?NVIDIA-Linux-x86_64-470.57.02.run

安裝:./NVIDIA-Linux-x86_64-470.57.02.run

4、問(wèn)題: Install NVIDIA's 32-bit compatibility libraries?? 回答:No

七、如果docker不能用gpu

把舊的提交為image,用image新建容器就可以使用gpu

nvidia-docker run -tid --name mynew -v /home/username:/home image:v1

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容