centos7.0安装cuda驱动
00、CUDA简介
CUDA和GPU的并行处理能力来加速深度学习和其他计算密集型应用程序

01、CPU+GPU协同架构

02、部署环境
[docker@lab-250 ~]$ cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.0 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.0"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.0 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.0:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION=7.0
Red Hat Enterprise Linux Server release 7.0 (Maipo)
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[docker@lab-250 ~]$ uname -r
3.10.0-123.el7.x86_64
[docker@lab-250 ~]$ uname -a
Linux lab-250 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
注意:要在服务器上安装GPU显卡
03、下载CUDA-Tookit
https://developer.nvidia.com/cuda-toolkit-archive
CUDA Toolkit 9.0 (Sept 2017), Online Documentation //实验下载此版本,根据系统下载对应的安装包,建议选择本地集成成果包!
https://developer.nvidia.com/cuda-toolkit

注意:下面的安装,是由于系统是rhel7.0,错误认为是centos7.0导致部分rpm未安装需要单独下载。一般对应版本是不需要在额外下载rpm包
cuda-repo-rhel7-9-0-local-9.0.176-1.x86_64-rpm #centos7,由于centos是基于rhel7的开源发行版本,所以名字rhel7
04、setup
Installation Instructions:
rpm -i cuda-repo-rhel7-9-0-local-9.0.176-1.x86_64.rpm
yum clean all && yum makecache
yum install cuda
Other installation options are available in the form of meta-packages.
For example, to install all the library packages, replace "cuda" with the "cuda-libraries-9-0" meta package
注意:安装cuda的时候它会自动找NVIDIA显卡的,不需要提前把NVIDIA显卡设置为默认显卡
错误处理:
https://mirrors.aliyun.com/epel/7/aarch64/Packages/d/dkms-2.6.1-1.el7.noarch.rpm
https://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/libvdpau-1.1.1-3.el7.x86_64.rpm
--> Finished Dependency Resolution
Error: Package: 1:nvidia-kmod-384.81-2.el7.x86_64 (cuda-9-0-local)
Requires: dkms
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@lab-250 ~]# rz -E
rz waiting to receive.
[root@lab-250 ~]# rpm -ivh dkms-2.6.1-1.el7.noarch.rpm
warning: dkms-2.6.1-1.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
error: Failed dependencies:
elfutils-libelf-devel is needed by dkms-2.6.1-1.el7.noarch
[root@lab-250 ~]#
[root@lab-250 ~]# yum install -y elfutils-libelf-devel
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.158-3.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved
[root@lab-250 ~]# rpm -ivh dkms-2.6.1-1.el7.noarch.rpm
warning: dkms-2.6.1-1.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:dkms-2.6.1-1.el7 ################################# [100%]
[root@lab-250 ~]#
[root@lab-250 ~]# yum install -y cuda
05、设置环境变量
/usr/local/cuda-9.0 #默认安装位置
vim /etc/profile
export CUDA_HOME="/usr/local/cuda-9.0"
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
source /etc/profile
[docker@lab-250 ~]$ nvcc -V #验证环境变量
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
[docker@lab-250 ~]$ nvidia-smi #查看本机GPU显卡信息,由于测试机未安装GPU显卡导致的
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installe
d and running.
引用:
https://baijiahao.baidu.com/s?id=1610852365402771191&wfr=spider&for=pc
https://www.jianshu.com/p/34a504af8d51
centos7.0安装cuda驱动的更多相关文章
- centos7.0安装docker报错
使用centos7.0安装dockers时出现Transaction check error错误. yum install docker Transaction check error: file / ...
- CentOS7.0 安装JAVA周围环境
CentOS7.0 安装JAVA周围环境 安装JDK 1.配置JDK环境变量 把下载好的JDK(jdk-7u75-linux-x64.gz)文件上传到 Reg: /home/p2pweb/java/ ...
- CentOS7.0安装EMQ代理服务
CentOS7.0安装EMQ代理服务 安装文件下载 官网 : https://www.emqx.io/cn/ 下载地址: https://www.emqx.io/cn/downloads 选择需要的版 ...
- CentOS7.3安装NVIDIA-1080ti驱动、cuda、cudnn、TensorFlow
本文为作者原创,转载请注明出处(http://www.cnblogs.com/mar-q/)by 负赑屃 Ubuntu非要换centOS...好吧... 看了很多是通过ELRepo源安装驱动,不过我没 ...
- centos7.3安装nvidia驱动和cuda9
一, 挂载本地源镜像 1) 下载操作系统镜像 所有服务器操作系统必须统一,本平台只支持 CentOS 7.3 1611,镜像下载地址. 2) 上传镜像到服务器 ,假设上传在 root 下 3) 建立挂 ...
- centos7.0安装docker-18.06.1-ce不能启动问题
最近用centos7.0 yum安装了一个docker-ce18.06.1 但是发现安装好不能启动,于是上官网看了一下,说是docker-ce18.06.1是从centos7.2开始支持的,但是7. ...
- centos7.0 安装redis集群
生产环境下redis基本上都是用的集群,毕竟单机版随时都可能挂掉,风险太大.这里我就来搭建一个基本的redis集群,功能够用但是还需要完善,当然如果有钱可以去阿里云买云数据库Redis版的,那个还是很 ...
- centos7.0 安装字体库
最近在centos7.0下用itextpdf将word文档转成pdf时出现字体丢失的情况.网上找了很多资料,各式各样的原因和解决方法.后来经过一番测试发现是centos7.0 minimal没有安装相 ...
- CentOS7.0安装与配置Tomcat-7
解决权限不够 #chmod a+x filename 安装说明 安装环境:CentOS-7.0.1406安装方式:源码安装 软件:apache-tomcat-7.0.29.tar.gz 下载地址:ht ...
随机推荐
- POJ 2251 Dungeon Master (非三维bfs)
Dungeon Master Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 55224 Accepted: 20493 ...
- sql语句表示不等于
<> != 后面均不带引号“”
- gevent实现基于epoll和协程的服务器
1. 导gevent中的猴子补丁,来把原来python自带的socket变成基于epoll的socket(解除阻塞问题) 代码: # from gevent import monkey;monkey. ...
- CSU 1592 石子合并 (经典题)【区间DP】
<题目链接> 题目大意: 现在有n堆石子,第i堆有ai个石子.现在要把这些石子合并成一堆,每次只能合并相邻两个,每次合并的代价是两堆石子的总石子数.求合并所有石子的最小代价. Input ...
- Python Pexpect库的简单使用
Python Pexpect库的使用 简介 最近需要远程操作一个服务器并执行该服务器上的一个python脚本,查到可以使用Pexpect这个库.记录一下. 什么是Pexpect?Pexpect能够产生 ...
- BZOJ-2-4870: [Shoi2017]组合数问题 矩阵优化 DP
就 是 要 我 们 从 n k 件 物 品 里 面 选 出 若 干 件,使 得 其 数 量 模 k 等 于 r 的 方 案 数 . dp方程 f [ i , j ] 表示前 i 件物品拿了若干件使 ...
- c/c++保存日志程序模板
//输出日志 int PrintRunInfo(char *fmt, ...) { FILE* fp; fp = fopen("cgi_log.txt","a+&qu ...
- SSM整合Activiti
1.pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="h ...
- JavaScript基础笔记(一)基本概念
基本概念 一.语法 一)区分大小写 二)标识符 书写规则同Java 三)注释 略 四)严格模式 1.在整个脚本中启用严格模式:在顶部添加 "use strict" 2.指定函数在严 ...
- node中的cluster模块开启进程,进程共享数据
说明:共享数据 var collection = [41, 41, 41, 41] master.js console.log('###---start---###') var cluster = r ...