Using GPU Operator with OpenShift#
For supported OpenShift deployments, choose the driver for your environment:
For the NVIDIA Data Center GPU Driver on bare metal or VMware vSphere with GPU passthrough, follow Installing the NVIDIA GPU Operator on OpenShift. Select the Operator and driver versions in the Support Matrix.
For the vGPU™ for Compute Guest Driver on VMware vSphere with vGPU, follow the procedure on this page. It configures GPU Operator to install a prebuilt NVIDIA AI Enterprise guest driver image on the worker VMs.
For Government Ready components, refer to Government Ready on OpenShift.
Prerequisites for the vGPU Guest Driver#
Before installing the vGPU guest driver, check your configuration in the Support Matrix. You also need:
An NVIDIA AI Enterprise subscription and an NGC™ API key with access to the guest driver image.
An NVIDIA License System client configuration token.
Prepare VMware vSphere Worker VMs#
Install NVIDIA Virtual GPU Manager on the VMware ESXi hosts and assign a supported vGPU to each GPU worker VM. Refer to Installing NVIDIA Virtual GPU Manager and Configuration. Install OpenShift on vSphere using the Red Hat OpenShift installation instructions.
Configure each worker VM and the worker VM template to use EFI firmware and disable Secure Boot. Power off running worker VMs before changing their firmware settings. To change the template, convert it to a VM, update the settings, and convert it back to a template. For a user-provisioned installation, set EFI before the worker VMs start; for an installer-provisioned installation, set EFI after the VMs are deployed.
In each worker VM’s VM Options > Advanced > Configuration Parameters, set:
pciPassthru.use64bitMMIO = TRUE
pciPassthru.64bitMMIOSizeGB = 512
For GPUDirect® RDMA, also set:
pciPassthru.allowP2P = true
pciPassthru.RelaxACSforP2P = true
Install GPU Operator and Configure the Guest Driver#
Install the Node Feature Discovery Operator and the GPU Operator. Wait to create the ClusterPolicy until after you prepare the image pull and licensing Secrets.
In the OpenShift console, select the Operator project, such as
nvidia-gpu-operator. Under Workloads > Secrets, select Create > Image Pull Secret. Enter the following values and create the Secret:Secret name:
ngc-secretAuthentication type: Image registry credentials
Registry server address:
nvcr.io/nvidia/vgpuUsername:
$oauthtokenPassword: Your NGC API key
Email: Your NGC account email address
Save the client configuration token as
client_configuration_token.tokand create an emptygridd.conffile. Create a licensing Secret in the Operator namespace:$ oc create secret generic licensing-config -n nvidia-gpu-operator \ --from-file=gridd.conf --from-file=client_configuration_token.tok
Replace
nvidia-gpu-operatorif you installed the Operator in a different namespace.In the NGC Catalog, find the vGPU for Compute Guest Driver container for the driver version in the Support Matrix. On the Tags tab, select the image tag for that driver and your OpenShift version. The OpenShift tags include the RHCOS version, for example
<driver-version>-rhcos<openshift-version>. Use the image name and tag shown in the catalog for that operating system.In the OpenShift console, open Installed Operators and select NVIDIA GPU Operator. Installed Operators is under Ecosystem or Operators, depending on the OpenShift version. On the ClusterPolicy tab, select Create ClusterPolicy.
Expand NVIDIA GPU/vGPU Driver config and configure:
enabled: Enable the driver.
licensingConfig > secretName:
licensing-config.licensingConfig > nlsEnabled: Enable NVIDIA License System licensing.
repository:
nvcr.io/nvidia/vgpu.image: The guest driver image name from the NGC Catalog.
version: The guest driver image tag selected for your OpenShift version.
Under Advanced configuration > Image Pull Secret, add
ngc-secret.
To use GPUDirect RDMA, enable rdma in the driver configuration. Select Create to create the ClusterPolicy.
Verify the Installation#
Wait for the ClusterPolicy to report ready and for the Operator and driver
pods to start. Installation can take several minutes. Replace the namespace
below if necessary:
$ oc get clusterpolicy
$ oc get pods -n nvidia-gpu-operator
$ oc get nodes -o=custom-columns='Node:metadata.name,GPUs:status.capacity.nvidia\.com/gpu'
Check that the GPU worker nodes report GPU resources. To check the license on a
worker, replace <driver-pod> with its driver pod name and inspect the
vGPU Software Licensed Product license status:
$ oc exec -n nvidia-gpu-operator <driver-pod> -c nvidia-driver-ctr -- nvidia-smi -q
Refer to Verifying the License Status of a Licensed NVIDIA vGPU for Compute Guest VM for an example. To replace a licensing token later, refer to Updating the GPU Operator License Token.
For additional OpenShift configuration, upgrades, and troubleshooting, refer to the GPU Operator on OpenShift documentation and OpenShift troubleshooting.