For worker nodes with GPU, you are required to install the Nvidia docker runtime.
This document is for ubuntu user, check the correspond vendor site if you are using other linux distro.
<aside> ⚠️ Note: If your environment is in an air-gap (cannot access the public internet), then you will first need to upload the required files into the air-gap environment.
</aside>
Before installing the Nvidia driver, first install the required packages:
sudo apt-get update
sudo apt-get install gcc make libc6-dev --no-install-recommends -y
Use the following commands to download, and then install the Nvidia device driver:
Visit this site to view the full list of the available drivers version from NVIDIA.
Set the value of NVIDIA_DRIVER
to the desired driver version to match your GPU hardware.
# Download the installer
NVIDIA_DRIVER=545.29.02
curl -OL <https://download.nvidia.com/XFree86/Linux-x86_64/$NVIDIA_DRIVER/NVIDIA-Linux-x86_64-$NVIDIA_DRIVER.run>
# Running the installer
sudo bash NVIDIA-Linux-x86_64-$NVIDIA_DRIVER.run --ui=none
Visit this site for the full list of the available nvidia-device-plugin versions from NVIDIA.
Set the value of NVIDIA_PLUGIN
to the desired version to match your GPU hardware.
NVIDIA_PLUGIN=0.14.2
curl -OL <https://nvidia.github.io/k8s-device-plugin/stable/nvidia-device-plugin-$NVIDIA_PLUGIN.tgz>