RAPIDS | NVIDIA Setup on Google Collaboratory

Accredian Publication
2 min readJan 27, 2022

--

Introduction

Now that you got a basic idea about GPUs and their need in data science and why technologies like RAPIDS are essential, we will show you how to set up RAPIDS on Google Collaboratory. But before diving in, we recommend creating a Google Account if not created already. Let’s start.

Check NVIDIA Compatibility

The first requirement to set up RAPIDS on Google Collab is to check the compatibility. We will verify if the backend is connected to the Tesla T4 GPU by executing the following commands. If your Collab Instance is not RAPIDS compatible, it will warn you and give you remediation steps.

!nvidia-smi
!git clone https://github.com/rapidsai/rapidsai-csp-utils.git!python rapidsai-csp-utils/colab/env-check.py

Update Collab Environment

The following commands will update the Collaboratory environment and restart the kernel. We recommend not executing the next set of codes until the session gets crashed.

!bash rapidsai-csp-utils/colab/update_gcc.sh -qqimport osos._exit(00)

Installation of Conda Collab

Next, we will install condacollab, and once it gets installed, the runtime will crash one more time and restart again.

import condacolabcondacolab.install()

Installation of RAPIDS

Next, we will install RAPIDS using a python script and set up some environment variables. Please note that it will take at least 15 minutes for installation. So, take a break and grab a cup of coffee/tea.

!python rapidsai-csp-utils/colab/install_rapids.py stableimport osos.environ[‘NUMBAPRO_NVVM’] = ‘/usr/local/cuda/nvvm/lib64/libnvvm.so’os.environ[‘NUMBAPRO_LIBDEVICE’] = ‘/usr/local/cuda/nvvm/libdevice/’os.environ[‘CONDA_PREFIX’] = ‘/usr/local’

Version Check of RAPIDS

To check the version of RAPID installed, execute the following command:

import cudf, cumlprint(‘cuml version:’, cuml.__version__, ‘, cudf version:’, cudf.__version__)

What’s next?

Regression in RAPIDS vs Sklearn

--

--

Accredian Publication

One of India’s leading institutions providing world-class Data Science & AI programs for working professionals with a mission to groom Data leaders of tomorrow!