Deploy Rapids on IBM Cloud Virtual Server for VPC

Syed Afzal Ahmed
5 min readAug 2, 2022

--

This document will describe how to deploy Rapids on IBM Cloud using IBM Cloud Virtual Server Instance for Virtual Private Cloud (VPC).

Contents

1. Introduction

2. Deployment Options

3. Rapids on IBM Cloud Virtual Server for VPC

3.1 Pre-requisites

3.2 Provision of the IBM Cloud Virtual Server Instance for VPC Infrastructure

3.3 Deploy Rapids on IBM Cloud Virtual Server Instance for VPC

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.0 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)

Deploying the Rapids using IBM Cloud Virtual Server for VPC is the simplest one, which is going to be covered in this guide. This deployment will use the Docker service to run the Rapids container on IBM Virtual Server Instance.

3.0 Rapids on IBM Cloud Virtual Server for VPC

This is about running Rapids on IBM Cloud Virtual Server using the Docker image, which is the easiest method. To deploy Rapids on IBM Cloud Virtual Server Instance, follow the below steps. Upon the completion of these steps, you would have the Rapids up and running on the IBM VSI in a Docker container.

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

2. Provision the Virtual Server Instance (GPU enabled) in VPC Infrastructure, if you have already set up one, skip to step 3.

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.

· Putty

· SSH-Key generator

· Have created the public key using the SSH-Key generator.

3.2 Provision of the IBM Cloud Virtual Server Instance for VPC Infrastructure

· Got to Virtual Server Instance in VPC Infrastructure from Menu (VSI).

· Click on Create to create a new Virtual Server Instance.

· Leave the values to default for Architecture as Intel, and Hosting type as Public.

· Select the location as per your feasibility, name your cluster and leave the Resource Group to default.

· In Operating System, select Ubuntu Linux, and Version as 20.04.

· In Profile Section, check on Category as GPU and select any GPU-enabled instance from the available instance and click save.

· Select the SSH key if you have already one created, or create a new one (you would need to copy the public key that you have created previously using SSH-Key Gen on your local machine).

· Leave the other options to default, and click on Create virtual server.

· Once the VSI has been up and running, you can connect to it using SSH with Floating IP, once the Floating IP is created, that is required to be associated with this instance.

· To create the Floating IP, go to VPC InfrastructureNetworkFloating IPs and click on Reserve.

· Select the region as same as your VSI was in, name the IP, and specify the resource to bind with this IP, in our case, it would be VSI that we created, and leaving other values to default and click on reserve.

· Now you can see the floating IP associated with the VSI, note down this IP to get ssh into this VSI and deploy the Rapids on it.

3.3 Deploy Rapids on IBM Cloud Virtual Server Instance for VPC

· Using the key and the floating IP, connect to the VSI on any SSH tool.

· Install the Docker & NVIDIA Docker Runtime in the VSI.

Note: To pull the latest docker image for Rapids, you can copy the command from this link after choosing the latest release, OS arch, Cuda, Install Method, and Python version.

· Pull the Rapids Docker Image using the below command.

$ sudo docker pull rapidsai/rapidsai:22.06-cuda11.5-runtime-ubuntu20.04-py3.9

· Run the Rapids Docker container from the pulled image using the below command.

$ sudo docker run — gpus all — rm -it — shm-size=1g — ulimit memlock=-1 -p 8888:8888 -p 8787:8787 -p 8786:8786 rapidsai/rapidsai:22.06-cuda11.5-runtime-ubuntu20.04-py3.9

3.4 Verifying the Deployment

Once the Rapids is up and running, it can be seen running and accessed using the floating IP and port mentioned.

· Copy the floating IP address followed by the port in the browser and see it running.

The VSI deployment is done. Enjoy!

--

--