Deploy Rapids on IBM Cloud Kubernetes Service

Syed Afzal Ahmed
5 min readAug 2, 2022

--

This document will describe how to deploy Rapids on IBM Cloud using the Kubernetes service from IBM.

Contents

1. Introduction

2. Deployment Options

3. Rapids on IBM Cloud Kubernetes Service (IKS)

3.1 Pre-requisites

3.2 Provision of the IBM Cloud Kubernetes Cluster

3.3 Deploy Rapids on the Cluster

3.4 Verifying the Deployment

1.0 Introduction

To complete this tutorial, you should have an IBM cloud account, if you do not have one, please register/signup here.

Note: Rapids is the accelerated data science tool that requires GPU-based computing, and this GPU feature requires you to upgrade your IBM cloud account from free to Standard user and will also incur charges as per IBM pricing.

2. Deployment Options

To deploy Rapids on IBM Cloud, there are multiple options /services from IBM, which can be considered to be used.

1. Using the IBM Cloud Virtual Server for VPC

2. Using the IBM Cloud Kubernetes Service (IKS)

In this guide, we will deploy Rapids using the Kubernetes service from IBM.

3.0 Rapids on IBM Cloud Kubernetes Service (IKS)

To deploy Rapids on IBM Kubernetes Service, follow the below steps. Upon the completion of these steps, you would have the Rapids up and running on the IBM Kubernetes Cluster.

1. Setting up the Pre-requisites, if you have already set up one, skip to step 2.

2. Provision the IBM Cloud Kubernetes Cluster (GPU enabled), (skip to step 3 if you have already set up one).

3. Deploy the Rapids.

3.1 Pre-requisites

To set up the pre-requisites, you should have the below tools installed on your local machine.

· IBM Cloud CLI (How to install IBM Cloud CLI)

· Kubectl (How to install Kubectl)

· Helm (How to install Helm)

3.2 Provision the IBM Cloud Kubernetes Cluster

· Go to the Kubernetes  Clusters from IBM Management Console.

· Select the plan as standard, as it can not be done in free version, as you are required to provision the GPU-enabled worker nodes.

· Leave the infrastructure as default to Classic.

· In Location, leave the Resource Group to default and specify the Geography as per your suitability, and Availability to Single zone (multizone would incur you more charges) and Worker zone to as per suitability.

· Change the Worker Pool Flavor from default to any GPU-enabled instance.

· Change the Worker nodes per zone to one (otherwise it will incur charges for the defined number of nodes), and name your worker pool, while leaving other parameters to default.

· Change the Kubernetes Version to 1.21.14, otherwise the Rapids Pods would be stuck in a pending state.

· Name the Cluster and click on Create.

When the cluster would be ready, you can see such like the screen below.

· Now to connect and configure the cluster so that the Rapids be deployed over it, click on Actions and click on Connect via CLI, and copy the commands and run them on your local machine terminal or command prompt.

Note: The IBM Cloud CLI tool should be installed on the Local Machine to connect to the Kubernetes cluster and configure it.

3.3 Deploy Rapids on the Cluster

Follow the below steps to deploy Rapids on the newly created Kubernetes cluster.

· To connect to the cluster, open terminal (if mac) or command prompt (if windows) and run the below command.

$ ibmcloud login -a cloud.ibm.com -r us-south -g default –sso

The above command will open a terminal and generate a code on a browser, you have to copy the code and paste it here.

· Once you are successfully connected to the targeted resource group and targeted region, run the below command to see your available clusters.

$ ibmcloud ks cluster ls

· Configure to set your newly created cluster as the current context with the below command.

$ ibmcloud ks cluster config — cluster cb7ie2qd0e3048arlvag

· Verify if you have successfully set the current context to your required cluster with the below command.

$ kubectl config current-context

· Setup the NVIDIA drivers by adding the helm repo for NVIDIA with the below command.

$ helm repo add nvdp https://nvidia.github.io/k8s-device-plugin

· Update the helm repo with the below command.

$ helm repo update

· Now install the NVIDIA plugin with the below command.

$ helm install — version=0.6.0 — generate-name nvdp/nvidia-device-plugin

· Now to install Rapids, add the helm repo for Rapids with the below command.

$ helm repo add rapidsai https://helm.rapids.ai

· Run below command to update the helm repo again.

$ helm repo update

· Now install the Rapids with the below command. The below command will install the Rapids using the helm chart with service type as Network Load Balancer.

$ helm install — set dask.scheduler.serviceType=”LoadBalancer” — set \ dask.jupyter.serviceType=”LoadBalancer” rapidstest rapidsai/rapidsai

3.4 Verifying the Deployment

To verify the Rapids deployment on IKS, run the below command to get the Network Load Balancer Access URL (public IP here) after the pods have been in a running state.

$ kubectl get svc

Note: It will take some time for pods to be in running state (can check the status with $kubectl get pods), the URL would not be up until the pods are in running state.

Open the browser and copy the external IP into the address bar to access the deployed Rapidsai-jupyter

The IKS deployment is done, enjoy it.

--

--