Ubuntu更新显卡驱动及安装多版本cuda

前言:

win下安装高版本NVIDIA驱动,在conda环境下可以通过安装cudatoolkit自由切换不同版本的cuda。
但是在Ubuntu上实践时,由于最开始NVIDIA驱动过低,导致conda环境下切换失败,因此本文将首先对NVIDIA驱动进行升级。
安装了NVIDIA驱动,通过nvidia-smi可以查看该驱动最高支持的cuda版本

1. 下载显卡驱动

网址:https://www.nvidia.cn/Download/index.aspx?lang=cn

2. 安装显卡驱动

参考https://blog.csdn.net/feynman233/article/details/79187490中的ppa安装法:
ctrl+alt+F1进入文本模式:
关闭图形界面:

sudo /etc/init.d/lightdm stop

卸载旧的驱动:

sudo apt-get --purge remove nvidia-*

安装新驱动:

sudo sh NVIDIA-Linux-x86_64-xxx.run

最后重启OK
参考:https://www.cnblogs.com/chua-n/p/13208398.html

3. 安装cuda

参考https://blog.csdn.net/feynman233/article/details/79187490和https://blog.csdn.net/yinxingtianxia/article/details/80462892
cuda下载地址:https://developer.nvidia.com/cuda-downloads
选取runfile文件安装方式

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值