赞
踩
# 查看本机显卡 lspci | grep -i nvidia # 添加ELRpo源 # 1. 导入公钥 rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org # 2. 添加源 rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm # 安装显卡检查程序 yum -y install nvidia-detect # 查找合适驱动, 一般是kmod-nvidia nvidia-detect # 安装kernel-devel依赖, 没有gcc的还要安装gcc yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r) # 安装显卡驱动 install $(nvidia-detect) yum -y install kmod-nvidia # 重启 reboot # 驱动安装完成 nvidia-smi # 切换到tmp cd /tmp/ # 下载cuda, 版本下载链接可去nvidia官网查 wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-rhel7-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm # 安装cuda rpm -i cuda-repo-rhel7-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm yum clean all yum -y install cuda # 添加环境变量 export PATH=$PATH:/usr/local/cuda-10.2/bin export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH # 查看cuda是否安装成功 nvcc -V
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。