Install NVIDIA Drivers and Vulkan on CentOS/RHEL

Install Prerequisites

Install the Extra Packages for Enterprise Linux (EPEL) repository and other packages before installing NVIDIA drivers.

For CentOS, use yum to install the epel-release package.

sudo yum install epel-release

Use the following install command for RHEL.

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

RHEL-based distributions require Dynamic Kernel Module Support (DKMS) to build the GPU driver kernel modules. For more information, see https://fedoraproject.org/wiki/EPEL. Upgrade the kernel and restart the machine.

sudo yum upgrade kernel
sudo reboot now

Install Kernel Headers

Install kernel headers and development packages:

sudo yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

If installing kernel headers does not work correctly, follow these steps instead:

  1. Identify the Linux kernel you are using by issuing the uname -r command.

  2. Use the name of the kernel (3.10.0-862.11.6.el7.x86_64 in the following code example) to install kernel headers and development packages:

sudo yum install \
kernel-devel-3.10.0-862.11.6.el7.x86_64 \
kernel-headers-3.10.0-862.11.6.el7.x86_64

Install the dependencies and extra packages:

sudo yum install kernel-devel kernel-headers pciutils dkms

Install NVIDIA Drivers and Vulkan

CUDA is a parallel computing platform and application programming interface (API) model. It uses a CUDA-enabled graphics processing unit (GPU) for general-purpose processing. The CUDA platform provides direct access to the GPU virtual instruction set and parallel computation elements. For more information on CUDA unrelated to installing HEAVY.AI, see https://developer.nvidia.com/cuda-zone. You can install drivers in multiple ways. This section provides installation information using the NVIDIA website or using yum.

Although using the NVIDIA website is more time consuming and less automated, you are assured that the driver is certified for your GPU. Use this method if you are not sure which driver to install. If you prefer a more automated method and are confident that the driver is certified, you can use the package-manager method.

Install NVIDIA Drivers Using the NVIDIA Website

Install the CUDA package for your platform and operating system according to the instructions on the NVIDIA website (https://developer.nvidia.com/cuda-downloads).

If you do not know the GPU model installed on your system, run this command:

lspci -v | egrep "3D|VGA*.NVIDIA" | awk -F '\[|\]' ' { print $2 } '

The output shows the product type, series, and model. In this example, the product type is Tesla, the series is T (as Turing), and the model is T4.

Tesla T4
  1. Select the product type shown after running the command above.

  2. Select the correct product series and model for your installation.

  3. In the Operating System dropdown list, select Linux 64-bit.

  4. In the CUDA Toolkit dropdown list, click a supported version (11.4 or higher).

  5. Click Search.

  6. On the resulting page, verify the download information and click Download.

Please check that the driver's version you are downloading meets the HEAVI.AI minimum requirements.

Move the downloaded file to the server, change the permissions, and run the installation.

chmod +x NVIDIA-Linux-x86_64-*.run
sudo ./NVIDIA-Linux--x86_64-*.runYou might get the following error during installation:

You might receive the following error during installation:

ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.

If you receive this error, blacklist the Nouveau driver by editing the /etc/modprobe.d/blacklist-nouveau.conffile, adding the following lines at the end:

blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off

Install NVIDIA Drivers Using Yum

Install a specific version of the driver for your GPU by installing the NVIDIA repository and using the yum package manager.

When installing the driver, ensure that your GPU model is supported and meets the HEAVI.AI minimum requirements.

Add the NVIDIA network repository to your system.

sudo yum-config-manager --add-repo \
https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo

Run the available drivers for the download.

yum list nvidia-driver-branch-[0-9][0-9][0-9].x86_64

Available Packages
nvidia-driver-branch-418.x86_64    3:418.226.00-1.el7     cuda-rhel7-x86_64 
nvidia-driver-branch-440.x86_64    3:440.118.02-1.el7     cuda-rhel7-x86_64 
nvidia-driver-branch-450.x86_64    3:450.191.01-1.el7     cuda-rhel7-x86_64 
nvidia-driver-branch-455.x86_64    3:455.45.01-1.el7      cuda-rhel7-x86_64 
nvidia-driver-branch-460.x86_64    3:460.106.00-1.el7     cuda-rhel7-x86_64 
nvidia-driver-branch-465.x86_64    3:465.19.01-1.el7      cuda-rhel7-x86_64 
nvidia-driver-branch-495.x86_64    3:495.29.05-1.el7      cuda-rhel7-x86_64 
nvidia-driver-branch-510.x86_64    3:510.73.08-1.el7      cuda-rhel7-x86_64 
nvidia-driver-branch-515.x86_64    3:515.43.04-1.el7      cuda-rhel7-x86_64 

Install the driver version needed with yum.

sudo yum install nvidia-driver-branch-<version>.x86_64

Reboot your system to ensure that the new version of the driver is loaded.

sudo reboot

Check NVIDIA Driver Installation

Run nvidia-smi to verify that your drivers are installed correctly and recognize the GPUs in your environment. Depending on your environment, you should see something like this to confirm that your NVIDIA GPUs and drivers are present:

If you see an error like the following, the NVIDIA drivers are probably installed incorrectly:

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

Review the Install NVIDIA Drivers section and correct any errors.

Install Vulkan

To work correctly, the back-end renderer requires a Vulkan-enabled driver and the Vulkan library. Without these components, the database cannot start without disabling the back-end renderer.

Install the Vulkan library and its dependencies using yum both CentOS and RHEL.

sudo yum install vulkan

If installing on RHEL, you must obtain and manually install the vulkan-filesystem package manually. Perform these additional steps:

  1. Download the rpm file

    wget http://mirror.centos.org/centos/7/os/x86_64/Packages/vulkan-filesystem-1.1.97.0-1.el7.noarch.rpm
  2. Install the rpm file

    sudo rpm --install vulkan-filesystem-1.1.97.0-1.el7.noarch.rpm

You might see a warning similar to the following:

warning: cuda-repo-rhel7-10.0.130-1.x86_64.rpm: Header V3 RSA/SHA512 Signature, key ID 7fa2af80: NOKEY

Ignore it now; you can verify NVIDIA driver installation here.

For more information about troubleshooting Vulkan, see the Vulkan Renderer section.

Install CUDA Toolkit ᴼᴾᵀᴵᴼᴺᴬᴸ

You must install the CUDA Toolkit if you use advanced features like C++ User-Defined Functions or User-Defined Table Functions to extend the database capabilities.

  1. Add the NVIDIA network repository to your system:

sudo yum-config-manager --add-repo \
https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo

2. List the available CUDA Toolkit versions:

yum list cuda-toolkit-* | egrep -v config

Available Packages
cuda-toolkit-10-0.x86_64                     10.0.130-1        cuda-rhel7-x86_64
cuda-toolkit-10-1.x86_64                     10.1.243-1        cuda-rhel7-x86_64
cuda-toolkit-10-2.x86_64                     10.2.89-1         cuda-rhel7-x86_64
cuda-toolkit-11-0.x86_64                     11.0.3-1          cuda-rhel7-x86_64
cuda-toolkit-11-1.x86_64                     11.1.1-1          cuda-rhel7-x86_64
cuda-toolkit-11-2.x86_64                     11.2.2-1          cuda-rhel7-x86_64
cuda-toolkit-11-3.x86_64                     11.3.1-1          cuda-rhel7-x86_64
cuda-toolkit-11-4.x86_64                     11.4.4-1          cuda-rhel7-x86_64
cuda-toolkit-11-5.x86_64                     11.5.2-1          cuda-rhel7-x86_64
cuda-toolkit-11-6.x86_64                     11.6.2-1          cuda-rhel7-x86_64

3. Install the CUDA Toolkit using yum:

sudo yum install cuda-toolkit-<version>.x86_64

4. Check that everything is working correctly:

nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0

Last updated