nvidia driver和cuda版本问题

一、查看显卡类型

lspci | grep -i nvidia

显卡版本查看

二、查看显卡对应的驱动版本

Download Drivers | NVIDIA

三、查看驱动对应的cuda版本 

Release Notes :: CUDA Toolkit Documentation

四、安装驱动

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

方式2:下载.run文件离线安装

             sudo service lightdm stop

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

             sudo service lightdm start

五、卸载驱动

给权限:chmod a+x NVIDIA-Linux-x86_64-418.67.run

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

问题: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

六、安装新驱动

1、如果出现错误 ERROR: You appear to be running an X server; please exit X before installing.

关闭:systemctl stop gdm.service  

2、查看:lsof | grep nvidia.uvm

如果不为空,关闭docker

systemctl stop docker

systemctl stop nvidia-docker.service

3、给权限:chmod a+x NVIDIA-Linux-x86_64-470.57.02.run

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

4、问题: 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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容