CentOS 7.x NVIDIA Driver installation

Latest NVIDIA driver installation that has worked for me on a fresh installation of CentOS 7.x. It requires you to update the kernel beforehand, so it may work in case someone accidentally updates their kernel.

Update 9/26/19: Works for fresh installation of CentOS 7.7.

Instructions

This is after a fresh install of CentOS

  1. Run update commands

    yum -y update && yum -y upgrade

    Note (1/8/19): At this time, it will take me to '3.10.0-957.1.3.el7.x86_64' on my next reboot.
    Note (8/12/19): If coming from an update, it will take me to a release just prior to latest until you update 'kernel-devel'

  2. Reboot system

    reboot
  3. Install this

    yum install kernel-devel epel-release
    # I selected 'GNOME Display' with 'Development tools' during the CentOS installation. If you did not select 'Development tools', use the next command
    yum groupinstall "Development Tools"
  4. Add 'nouveau.modeset=0' at the end of 'GRUB_CMDLINE_LINUX=' in the default GRUB

    nano /etc/default/grub
    GRUB_TIMEOUT=5 
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" 
    GRUB_DEFAULT=saved 
    GRUB_DISABLE_SUBMENU=true 
    GRUB_TERMINAL_OUTPUT="console" 
    GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet nouveau.modeset=0" 
    GRUB_DISABLE_RECOVERY="true"
  5. Apply GRUB configuration changes

    grub2-mkconfig -o /boot/grub2/grub.cfg
    grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
  6. Reboot system, again...

    reboot
  7. Download NVIDIA driver '.run' file from NVIDIA's website into root directory

    wget NVIDIA-Linux-x86_64* [make sure you obtain the correct one for your system..., do not blindly copy this]
    chmod +x NVIDIA*
  8. Use 'init 3' to disable Xorg server

    init 3
  9. Run NVIDIA driver '.run' file

    ./NVIDIA*
    # 'Yes' to install NVIDIA's 32-bit compatibility libraries
    # 1st option, or 'do not install' or 'continue', when it complained about 'an incomplete installation of libglvnd was found'
    # 'no' to running the 'nvidia-xconfig utility'.
  10. Validate NVIDIA driver installation using 'nvidia-smi'

    [root@localhost ~]# nvidia-smi
    Tue Jan  8 19:37:28 2019
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 410.93       Driver Version: 410.93       CUDA Version: 10.0     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  GeForce GTX 108...  Off  | 00000000:17:00.0 Off |                  N/A |
    | 14%   40C    P0    54W / 250W |      0MiB / 11178MiB |      4%      Default |
    +-------------------------------+----------------------+----------------------+
    
    +-----------------------------------------------------------------------------+
    | Processes:                                                       GPU Memory |
    |  GPU       PID   Type   Process name                             Usage      |
    |=============================================================================|
    |  No running processes found                                                 |
    +-----------------------------------------------------------------------------+

    Note: If it does not see the NVIDIA devices, you may need to reboot the system.