Installing the vGPU Guest Driver by Using GPU Operator#

Use this procedure to install GPU Operator on your Kubernetes cluster. The procedure also installs the NVIDIA vGPU™ for Compute Guest Driver from a prebuilt image in the NVIDIA AI Enterprise catalog.

Before you install, check the Support Matrix for your GPU, operating system, Kubernetes distribution, and software versions. For virtualized deployments, check the hypervisor too.

Prerequisites#

  • If your GPU worker nodes are VMs that use vGPU, install NVIDIA Virtual GPU Manager on each hypervisor hosting those VMs and assign a supported vGPU to each GPU worker VM. The steps that follow configure the worker nodes so Kubernetes workloads can use those vGPUs. Refer to Installing NVIDIA Virtual GPU Manager and Configuration.

  • Prepare a supported Kubernetes cluster and an installation machine with kubectl access to the cluster and Helm installed. Review the GPU Operator prerequisites, including the worker node and Node Feature Discovery requirements.

  • Ensure the guest driver is not installed on the worker nodes. GPU Operator installs the guest driver.

  • Generate a client configuration token for your NVIDIA License System instance. Refer to the NVIDIA License System User Guide.

  • Obtain an NVIDIA NGC™ API key with access to the NVIDIA AI Enterprise resources needed to pull the guest-driver image. Refer to the NGC API key instructions.

Install GPU Operator#

  1. Sign in to the NVIDIA NGC catalog. Open the NVIDIA AI Enterprise Infra 8 collection for the GPU Operator version in the Support Matrix, and find the GPU Operator installer script.

  2. On the File Browser tab, download the installer script for that GPU Operator version.

  3. Copy the client configuration token to the directory containing the installer script and rename the token to client_configuration_token.tok.

  4. Set the NGC API key and the email address for your NGC account:

    Listing 1 Set the NGC API key and account email#
    $ export NGC_API_KEY="<ngc-api-key>"
    $ export NGC_USER_EMAIL="<ngc-user-email>"
    
  5. From the directory containing the installer script and token, run the downloaded installer script:

    Listing 2 Install GPU Operator with the NVIDIA AI Enterprise script#
    $ bash gpu-operator-nvaie.sh install
    

    The filename shown is an example; use the filename you downloaded. The installer script creates the gpu-operator namespace if needed, configures licensing and an NGC image pull secret, and installs the Operator with Helm. It uses an existing licensing-config ConfigMap or ngc-secret without updating it.

    To update the licensing token after installation, refer to Updating the GPU Operator License Token.

Verify the Installation#

  1. Check the Operator and driver pods:

    Listing 3 Confirm Operator and driver pods#
    $ kubectl get pods -n gpu-operator -o wide
    

    Check that the Operator and driver pods on GPU worker nodes are running and ready. The installation can take several minutes.

  2. Check that the driver pod on each GPU worker node detects its GPU and reports a license. Replace <driver-pod> with the pod name:

    Listing 4 Check the driver pod GPU and license status#
    $ kubectl exec -n gpu-operator <driver-pod> -c nvidia-driver-ctr -- nvidia-smi -q
    

    Check the GPU information and the vGPU Software Licensed Product license status. Refer to Verifying the License Status of a Licensed NVIDIA vGPU for Compute Guest VM for an example.

    If you used a namespace other than gpu-operator, replace the namespace in these commands.

    To verify that Kubernetes can schedule GPU workloads, follow GPU Operator verification.