Ready to work
yum -y update
yum -y groupinstall "GNOME Desktop" "Development Tools"
yum -y install kernel-devel
yum -y install epel-release
yum -y install dkms
Restart the server. After restarting the server, you need to use uname -a to check whether the kernel is a non-debug version. If it is, replace the kernel and restart. See: https://o-my-chenjian.com/2018/03/25/Update-The-Version-Of-Kernel-On-CentOS7/
Edit the /etc/default/grub. file and add the following code to "GRUB_CMDLINE_LINUX"
rd.driver.blacklist=nouveau nouveau.modeset=0
Generate new configuration
grub2-mkconfig -o /boot/grub2/grub.cfg
Edit or create /etc/modprobe.d/blacklist.conf file adding:
blacklist nouveau
Update configuration
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)
Restart the server. After restarting the server, you need to use the lsmod | grep nouveau command to ensure that the nouveau driver is disabled.
Download nvidia drive: http://p04q9i6rr.bkt.clouddn.com/NVIDIA-Linux-x86_64-390.48.run
sh NVIDIA-Linux-x86_64-*.run
Restart the server.
Install cuda and cudnn: refer to https://www.cnblogs.com/mar-q/p/7482720.html
Install docker and nvidia-docker: Reference: https://blog.csdn.net/itaacy/article/details/72628792