For running GPU workload on the EWC Kubernetes Service the two prerequisites are required:

  • Cluster with some GPU-enabled worker nodes (one of the GPU flavours) running a Ubuntu GPU Image which comes with the Nvidia Driver installed on the base OS
  • Installed GPU operator from the Application Catalogue
    • Why not the device plugin but the operator? → The GPU operator handles the device discovery, validation, container toolkit installation, and many other important bits that we might need to do before starting to use the device plugin manually, then installs the device plugin as well.

Getting Started

  1. Provision a new Ubuntu-based cluster using one of the options described in this guide.
    Note: in the EUMETSAT side of the EWC only Ubuntu images are supported for GPU workload

  2. If you are provisioning the cluster manually, make sure to:
    1. select one of the GPU flavours for the worker nodes.
      Note: the GPU nodes need at least 60GB of disk space to deploy the GPU operator and related workload. Specify a larger custom disk size manually.
    2. Change the default Image Name to a GPU-enabled image (see list of available images).



  3.  If you provision a cluster using a template, manually add new Machine Deployment with GPU-enabled worker nodes afterwards.


  4. And provide the same values as in Step 2 above


  5. Once the GPU nodes are provisioned, deploy the NVIDIA GPU Operator - Time Slicing application from the Application Catalogue


  6. You can verify the status of the GPU operator by checking if all the pods in the respective namespace have been successfully deployed
    > kubectl get pods -n gpu-operator
    NAME                                                              READY   STATUS      RESTARTS   AGE
    gpu-feature-discovery-s5mrw                                       2/2     Running     0          17m
    gpu-operator-66b7896665-lkkf4                                     1/1     Running     0          17m
    gpu-operator-gpu-operator-node-feature-discovery-gc-84f7c8nzznn   1/1     Running     0          17m
    gpu-operator-gpu-operator-node-feature-discovery-master-65qtm5n   1/1     Running     0          17m
    gpu-operator-gpu-operator-node-feature-discovery-worker-7sf5l     1/1     Running     0          17m
    nvidia-container-toolkit-daemonset-rj2jt                          1/1     Running     0          17m
    nvidia-cuda-validator-8lx69                                       0/1     Completed   0          17m
    nvidia-dcgm-exporter-fwbz6                                        1/1     Running     0          17m
    nvidia-device-plugin-daemonset-sc5q7                              2/2     Running     0          17m
    nvidia-operator-validator-8cphr                                   1/1     Running     0          17m


  7. Deploy a test workload to verify the logs of the pod to confirm GPU access works as expected
    > cat << EOF | kubectl create -f -
     apiVersion: v1
     kind: Pod
     metadata:
       name: vector-add
     spec:
       restartPolicy: OnFailure
       containers:
       - name: vector-add
         image: nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda10.2
         resources:
           limits:
              nvidia.com/gpu: 1
    EOF
    

    > kubectl logs pod/vector-add
    [Vector addition of 50000 elements]
    Copy input data from the host memory to the CUDA device
    CUDA kernel launch with 196 blocks of 256 threads
    Copy output data from the CUDA device to the host memory
    Test PASSED
    Done
  • No labels