您好,登錄后才能下訂單哦!
一、配置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 |
+-----------------------------------------------------------------------------+
到此驅動已經安裝完成。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。