第一篇-ChatGLM-webui-Windows安装部署-CPU版
第二篇-二手工作站配置
第三篇-Tesla P40+CentOS-7+CUDA 11.7 部署实践
系统:CentOS-7
CPU: 14C28T
显卡:Tesla P40 24G
准备安装
驱动: 515
CUDA: 11.7
cuDNN: 8.9.2.26
yum clean all
yum update
yum install -y gcc gcc-c++ pciutils kernel-devel-$(uname -r) kernel-headers-$(uname -r)
lspci | grep -i nvidia
查看是否安装了nouveau,有结果表示正在使用nouveau
lsmod | grep nouveau
创建一个新的文件,在文件中加入下面两句代码
vim /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
dracut --force
reboot
lsmod | grep nouveau
-----------------------------------
备份执行
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut /opt/initramfs-$(uname -r).img $(uname -r)
修改运行级别为文本模式
systemctl set-default multi-user.target
重启
reboot
https://www.nvidia.cn/Download/index.aspx
Operating System: Linux 64-bit
CUDA Toolkit: 11.7
我下载的是 NVIDIA-Linux-x86_64-515.105.01.run
./NVIDIA-Linux-x86_64-515.105.01.run
重启之后出现选择界面,32 选择no
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla P40 Off | 00000000:03:00.0 Off | 0 |
| N/A 38C P0 49W / 250W | 0MiB / 23040MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
https://developer.nvidia.com/cuda-toolkit-archive
页面选择
Linux x86_64 CentOS 7 rulfile(local)
sh cuda_11.7.1_515.65.01_linux.run
选
accept
我只安装了 CUDA Toolkit 11.7 选择如下
│ - [ ] Driver │
│ [ ] 515.65.01 │
│ + [X] CUDA Toolkit 11.7 │
│ [ ] CUDA Demo Suite 11.7 │
│ [ ] CUDA Documentation 11.7 │
│ - [ ] Kernel Objects │
│ [ ] nvidia-fs │
│ Options
再选 install
vim /etc/profile
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
source /etc/profile
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:49:14_PDT_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0
https://developer.nvidia.com/rdp/cudnn-download
cudnn-linux-x86_64-8.9.2.26_cuda11-archive.tar.xz
/opt/nvidia/cudnn/
tar xvf cudnn-linux-x86_64-8.9.2.26_cuda11-archive.tar.xz
cd cudnn-linux-x86_64-8.9.2.26_cuda11-archive
cp include/cudnn.h /usr/local/cuda/include
cp lib/libcudnn* /usr/local/cuda/lib64
chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
Centos7安装NVIDIA GPU显卡驱动
https://blog.csdn.net/syl321314362/article/details/128751708
CentOS7 禁用nouveau及安装显卡驱动
https://blog.51cto.com/u_14825502/6101852
Centos升级OpenSSL版本
https://www.cnblogs.com/shiningrise/p/16840969.html
centos07-关闭防火墙
systemctl disable firewalld.service
systemctl stop firewalld
只能安装430.40对应cuda-11.4(好像),这个安装简单,但是cuda版本低
yum install nvidia-detect
检测显卡
$ nvidia-detect -v
根据检测的版本安装显卡驱动程序
$ yum install nvidia-x11-drv-430.40
版本号要一致
重启,运行命令,查看状态
$ nvidia-smi