centos 安装cuda cudnn

centos 安装cuda cudnn

#禁用nouveau

[root@localhost cuda] # sudo vim /etc/modprobe.d/blacklist.conf
blacklist nouveau
options nouveau modeset=0
[root@localhost cuda]# sudo dracut --force
[root@localhost cuda]# reboot
# 查询是否成功禁用nouveau 如果没有结果说明禁用成功
[root@localhost cuda]# lsmod |grep nouveau

#cuda下载地址 :https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=CentOS&target_version=7&target_type=rpm_local
在这里插入图片描述

# 查看NVIDIA驱动安装情况
[root@localhost cuda]# nvidia-smi```

## cudnn
参考文章https://blog.csdn.net/weixin_44607910/article/details/108226292

自身采用的方式 下载完cudnn,tar解压包,然后将解压的文件include,lib64复制到/usr/local/cuda-(你的版本)/include/   usr/local/cuda-(你的版本)/lib64/


# 报错1
error:unable to find the kernel source tree for the currently running kernel. please make sure you have installed the kernel source files for your kernel and that htey are properly configured; on red hat linux system, for example, be sure you have the ‘kernel-source’ or ‘kernel-devel’ RPM installed. if you know the correct kernel source files are installed ,you may specify the kernel source path with the ‘–kernel-source-path’ command line option

```bash
# 查询版本号
[root@localhost cuda]# uname -r
# yum install -y kernel-devel(对应版本号) 
[root@localhost cuda]# yum install -y kernel-devel-3.10.0-1160.31.1.el7.x86_64

卸载驱动

在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kui9702

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值