Google Kubernetes Engine#

RAPIDS can be deployed on Google Cloud via the Google Kubernetes Engine (GKE).

To run RAPIDS you’ll need a Kubernetes cluster with GPUs available.


First you’ll need to have the gcloud CLI tool installed along with kubectl, helm, etc for managing Kubernetes.

Ensure you are logged into the gcloud CLI.

$ gcloud init

Create the Kubernetes cluster#

Now we can launch a GPU enabled GKE cluster.

$ gcloud container clusters create rapids-gpu-kubeflow \
  --accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g \
  --zone us-central1-c --release-channel stable

With this command, you’ve launched a GKE cluster called rapids-gpu-kubeflow. You’ve specified that it should use nodes of type a2-highgpu-2g, each with two A100 GPUs.

Install drivers#

Next, install the NVIDIA drivers onto each node.

$ kubectl apply -f
daemonset.apps/nvidia-driver-installer created

Verify that the NVIDIA drivers are successfully installed.

$ kubectl get po -A --watch | grep nvidia
kube-system   nvidia-driver-installer-6zwcn                                 1/1     Running   0         8m47s
kube-system   nvidia-driver-installer-8zmmn                                 1/1     Running   0         8m47s
kube-system   nvidia-driver-installer-mjkb8                                 1/1     Running   0         8m47s
kube-system   nvidia-gpu-device-plugin-5ffkm                                1/1     Running   0         13m
kube-system   nvidia-gpu-device-plugin-d599s                                1/1     Running   0         13m
kube-system   nvidia-gpu-device-plugin-jrgjh                                1/1     Running   0         13m

After your drivers are installed, you are ready to test your cluster.

Let’s create a sample pod that uses some GPU compute to make sure that everything is working as expected.

$ cat << EOF | kubectl create -f -
apiVersion: v1
kind: Pod
  name: cuda-vectoradd
  restartPolicy: OnFailure
  - name: cuda-vectoradd
    image: "nvidia/samples:vectoradd-cuda11.6.0-ubuntu18.04"
       limits: 1
$ kubectl logs pod/cuda-vectoradd
[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

If you see Test PASSED in the output, you can be confident that your Kubernetes cluster has GPU compute set up correctly.

Next, clean up that pod.

$ kubectl delete pod cuda-vectoradd
pod "cuda-vectoradd" deleted

Install RAPIDS#

Now that you have a GPU enables Kubernetes cluster on GKE you can install RAPIDS with any of the supported methods.

Clean up#

You can also delete the GKE cluster to stop billing with the following command.

$ gcloud container clusters delete rapids-gpu-kubeflow --zone us-central1-c
Deleting cluster rapids...⠼

Related Examples#

Perform time series forecasting on Google Kubernetes Engine with NVIDIA GPUs

platform/kubernetes cloud/gcp/gke tools/dask-operator workflow/hpo workflow/xgboost library/dask library/dask-cuda library/xgboost library/optuna data-storage/gcs

Autoscaling multi-tenant Kubernetes Deep-Dive

platform/kubernetes cloud/gcp/gke tools/dask-operator library/cuspatial library/dask library/cudf data-format/parquet data-storage/gcs