CentOS 7 桌面版安装 cuda 12.4
1. 关闭 nouveau
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
# 写入以下两行文件之后保存即可
blacklist nouveau
options nouveau modeset=0
# 更新内核参数
sudo dracut --force
# 重启
sudo reboot
2. 关闭 x-server
sudo systemctl stop gdm
3. 下载文件并且安装cuda
wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
sudo sh cuda_12.4.0_550.54.14_linux.run
# 启动持久化模式,否则 nvidia-smi执行慢
sudo nvidia-persistenced --persistence-mode