Nvidia GPU Driver Installation on GPU Instance

How to install Nvidia GPU Driver?

Introduction

A GPU node is a computing node equipped with one or more Graphics Processing Units (GPUs). These nodes are essential in high-performance computing environments, particularly for tasks involving machine learning, deep learning, and other computationally intensive processes. In an automation suite like Automation AI Center, a GPU can significantly boost your AI/DU performance.

GPU node installation involves two steps:

  1. Nvidia GPU driver installation on the GPU instance
  2. GPU Node installation in Kubernetes

This article covers the first step, "Nvidia GPU Driver Installation on GPU Instance."

Prerequisites

Before proceeding with the GPU driver installation, ensure the following prerequisites are met:

  1. System Upgrade: Ensure your system is up-to-date.
    1. yum update
  2. Firewall Management: Disable and stop the firewall to avoid conflicts during installation.
    1. systemctl stop firewalld
      systemctl disable firewalld
  3. SELinux Management: Set SELinux to permissive mode
    1. setenforce 0
  4. Swap Management: Disable swap to optimize performance.
    1. swapoff -a
  5. Logical Volume Management: Resize logical volumes if additional space is required (optional): e.g
    1. lvresize -r -L +10G /dev/rootvg/rootlv
      

System Information and Compiler Installation

  1. Check for NVIDIA GPUs: Verify the presence of NVIDIA GPUs
    1. lspci | grep -i nvidia
      
  2. Check System Architecture and Release Information: Ensure the system architecture and release information are suitable for the installation (x64)
    1. uname -m && cat /etc/*release
      
  3. Check GCC Version: Verify the GCC version:
    1. gcc --version
      
  4. Install GCC: Install GCC if not already installed.
    1. yum install gcc
      

Driver Installation

  1. Add CUDA Repository: Add the CUDA repository for RHEL8/x86_64:
    1. sudo dnf config-manager --add-repo=https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
      
    2. Other repositories can be found here.
  2. Install CUDA Toolkit: Install the CUDA Toolkit, which requires the NVIDIA driver:
    1. sudo dnf -y install cuda-toolkit-12-8
      
  3. Install Kernel Development Packages: Install kernel development packages to ensure compatibility between the driver and the kernel.
    1. dnf install kernel-devel-$(uname -r) kernel-headers
      
  4. Install NVIDIA Driver: Install the NVIDIA driver:
    1. sudo dnf module install nvidia-driver:570
      
  5. Reboot the System: Reboot the system to apply changes:
    1. reboot
      
  6. Verify NVIDIA Driver Installation: Verify the installation of the NVIDIA driver:
    1. nvidia-smi
      

Once the NVIDIA driver installation is verified, proceed to the next step: GPU Node installation in Kubernetes (Automation Suite). Follow the documentation provided in related links section for provisioning the GPU node.