阿里ECS GPU机型如何安装驱动(系统:CentOS7.3 GPU:Nvidia P100)

发布时间:2020-07-17 23:28:56 作者:冰冻vs西瓜
来源:网络 阅读:865

一、配置DNS以及yum
1、配置DNS

[root@gpu-test-01 ~]# vim /etc/resolv.conf 
nameserver 223.5.5.5
nameserver 114.114.114.114
options timeout:2 attempts:3 rotate single-request-reopen
说明:我这里配置了两个外部DNS 223.5.5.5以及114.114.114.114
[root@gpu-test-01 ~]# chattr +i /etc/reslov.conf

2、配置yum

[root@gpu-test-01 ~]# cd /etc/yum.repos.d/
[root@gpu-test-01 yum.repos.d]# rm -rf ./*
[root@gpu-test-01 yum.repos.d]# mv /etc/yum.repos.d/* /tmp
[root@gpu-test-01 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@gpu-test-01 yum.repos.d]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
[root@gpu-test-01 yum.repos.d]# wget https://us.download.nvidia.cn/tesla/418.67/nvidia-diag-driver-local-repo-rhel7-418.67-1.0-1.x86_64.rpm
[root@gpu-test-01 yum.repos.d]# yum install nvidia-diag-driver-local-repo-rhel7-418.67-1.0-1.x86_64.rpm -y
[root@gpu-test-01 yum.repos.d]# mv nvidia-diag-driver-local-repo-rhel7-418.67-1.0-1.x86_64.rpm /tmp/

二、下载驱动包

1、下载P100/P4驱动:

[root@gpu-test-01 ~]# wget http://us.download.nvidia.com/tesla/396.44/NVIDIA-Linux-x86_64-396.44.run

2、下载内核开发包:

[root@gpu-test-01 ~]# wget https://buildlogs.centos.org/c7.1611.u/kernel/20170620132051/3.10.0-514.21.2.el7.x86_64/kernel-devel-3.10.0-514.21.2.el7.x86_64.rpm

3、下载cuda包:(如果使用yum来装cuda-drivers,这一步也可以忽略)

[root@gpu-test-01 ~]# wget https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux

三、配置信息

下载并安装kernel对应版本的kernel-devel和kernel-header包

[root@gpu-test-01 ~]# rpm -ivh kernel-devel-3.10.0-514.21.2.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:kernel-devel-3.10.0-514.21.2.el7 ################################# [100%]
[root@gpu-test-01 ~]# sudo rpm -qa | grep $(uname -r)
kernel-headers-3.10.0-514.21.2.el7.x86_64
kernel-3.10.0-514.21.2.el7.x86_64
kernel-devel-3.10.0-514.21.2.el7.x86_64

说明:kernel-devel和kernel版本不一致会导致在安装driver rpm过程中driver编译出错。您可以在实例里运行rpm –qa | grep kernel检测版本是否一致。确认版本后,再重新安装驱动。

[root@gpu-test-01 ~]# sh NVIDIA-Linux-x86_64-396.44.run
按照引导一路下一步:

验证下是否安装成功:

[root@gpu-test-01 ~]# nvidia-smi 
Sat Jun 22 18:39:14 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.44                 Driver Version: 396.44                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla P100-PCIE...  Off  | 00000000:00:08.0 Off |                    0 |
| N/A   33C    P0    27W / 250W |      0MiB / 16280MiB |      4%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

到此驱动已经安装完成。

推荐阅读:
  1. sublime text3中取消 换行时自动补全的注释
  2. 浅谈vue项目优化之页面的按需加载(vue+webpack)

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ecs gpu 驱动 机型 p10

上一篇:mariadb编译安装脚本

下一篇:Linux之网络管理(2)虚拟网卡

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》