安装Linux Nvidia 驱动程序

# 安装epel
shell > yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# 安装必要廉
shell > yum install -y tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel iptables firewalld vim bind-utils wget

# 配置密钥
shell > distribution=rhel7

# 配置repo
shell > ARCH=$( /bin/arch )
shell > yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-$distribution.repo

# 更新内核
shell > yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

# 安装
shell > yum clean expire-cache
shell > yum install -y nvidia-driver-latest-dkms

# 重启
shell > reboot

# 测试
shell > nvidia-smi

安装CUDA驱动

CUDA驱动包地址

shell > wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-rhel7-11-7-local-11.7.0_515.43.04-1.x86_64.rpm
shell > sudo rpm -i cuda-repo-rhel7-11-7-local-11.7.0_515.43.04-1.x86_64.rpm
shell > sudo yum clean all
shell > sudo yum -y install nvidia-driver-latest-dkms cuda
shell > sudo yum -y install cuda-drivers

# 如果需要安装ffmpeg , 记得将cuda bin添加环境变量
shell > vim /etc/profile
# 末尾追加
PATH=$PATH:/usr/local/cuda/bin

shell > source /etc/profile