3.4 GPU and DOCA drivers

NCP-AII · Control Plane Installation and Configuration (19% of the exam) · Official objective: “Install/update/remove NVIDIA GPU and DOCA drivers.”

Installing, checking, upgrading and removing the NVIDIA driver and DOCA-Host.

Key points

  1. The driver includes kernel modules, which are code that runs inside the Linux kernel. They are built against kernel headers. If the headers do not match the running kernel, the build fails. So install the headers for uname -r before the driver.

    What NVIDIA says (2)

    “it is best to manually ensure the correct version of the kernel headers and development packages are installed prior to installing the NVIDIA driver”

    — NVIDIA Driver Installation Guide: Pre-installation Actions

    “# apt install linux-headers-$(uname -r)”

    — NVIDIA Driver Installation Guide: Ubuntu

  2. The open kernel modules are NVIDIA's open-source GPU kernel driver. After enabling NVIDIA's repository, the guide installs them with apt install nvidia-open. For a compute-only server, it can install libnvidia-compute and nvidia-dkms-open instead.

    What NVIDIA says (2)

    “# apt install nvidia-open”

    — NVIDIA Driver Installation Guide: Ubuntu

    “apt -V install libnvidia-compute nvidia-dkms-open”

    — NVIDIA Driver Installation Guide: Ubuntu

  3. Installed is not the same as loaded. The kernel reports the loaded driver in /proc. The guide reads /proc/driver/nvidia/version.

    What NVIDIA says (1)

    “When the driver is loaded, the driver version can be found by executing the following command: $ cat /proc/driver/nvidia/version”

    — NVIDIA Driver Installation Guide: Post-installation Actions

  4. APT is Ubuntu's package manager. Pinning tells APT to stay on one driver branch or version. NVIDIA says the upgrade command stays the same. The pinning configuration decides where it lands.

    What NVIDIA says (2)

    “When upgrading the driver, whether configured to a pinned branch or the latest available, the command to execute is always the same; what matters is the APT pinning configuration:”

    — NVIDIA Driver Installation Guide: Ubuntu

    “# apt dist-upgrade”

    — NVIDIA Driver Installation Guide: Ubuntu

  5. DOCA-Host is NVIDIA's host software for ConnectX and BlueField: drivers, libraries and tools. OFED is the older InfiniBand and RDMA driver stack it replaced. Upgrading from 2.5.x needs a full uninstall first. From 2.6.0 or later, apt can upgrade in place.

    What NVIDIA says (2)

    “To upgrade from DOCA version 2.5.x, all DOCA and OFED related packages should be removed.”

    — DOCA: DOCA-Host Installation and Upgrade

    “Full uninstallation is required before installing DOCA-Host:”

    — DOCA: DOCA-Host Installation and Upgrade

  6. openibd is the service that loads the InfiniBand and RDMA drivers. MST (Mellanox Software Tools) creates device files used by the firmware tools. The DOCA guide updates firmware, loads the drivers, and initializes MST.

    What NVIDIA says (4)

    “host# sudo apt install -y doca-all”

    — DOCA: DOCA-Host Installation and Upgrade

    “Update the firmware: host# sudo apt install -y mlnx-fw-updater”

    — DOCA: DOCA-Host Installation and Upgrade

    “Load the drivers: host# sudo /etc/init.d/openibd restart”

    — DOCA: DOCA-Host Installation and Upgrade

    “Initialize MST: host# sudo mst restart”

    — DOCA: DOCA-Host Installation and Upgrade

  7. Removing packages with apt keeps the package database correct. Deleting files by hand does not. The guide purges a list of driver packages. The list includes nvidia-fabricmanager and nvidia-persistenced.

    What NVIDIA says (2)

    “Follow the below steps to properly uninstall the NVIDIA driver from your system.”

    — NVIDIA Driver Installation Guide: Removing the Driver

    “# apt remove --autoremove --purge -V”

    — NVIDIA Driver Installation Guide: Removing the Driver

Key terms

Try it

Sample question

Before installing the NVIDIA data center driver on Ubuntu, what does NVIDIA say to check first?

Show the answer

Answer: That kernel headers and development packages match the running kernel (uname -r).

The driver includes kernel modules, which are code that runs inside the Linux kernel. They are built against kernel headers. If the headers do not match the running kernel, the build fails. So install the headers for uname -r before the driver.

What NVIDIA says (2)

“it is best to manually ensure the correct version of the kernel headers and development packages are installed prior to installing the NVIDIA driver”

— NVIDIA Driver Installation Guide: Pre-installation Actions

“# apt install linux-headers-$(uname -r)”

— NVIDIA Driver Installation Guide: Ubuntu

Practice 3.4 (7 questions) Full Control Plane Installation and Configuration guide

← 3.3 Cluster setup: categories, Slurm, Enroot, Pyxis · 3.5 NVIDIA Container Toolkit →