Rapids installation on Linux

DaurEd
2 min readJan 15, 2021

--

The RAPIDS suite of software libraries, built on CUDA-X AI, gives you the freedom to execute end-to-end data science and analytics pipelines entirely on GPUs.

Installing rapids can be a headache as it requires few specific versions of some libraries and installing them individually can be laborious. So here we have our code which does everything for you.

It would be easy to run the following cells in google Colab.

nvidia-smi checks what GPU hardware is available.

!nvidia-smiThu Jan 14 06:49:11 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.27.04 Driver Version: 418.67 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |
| N/A 47C P8 9W / 70W | 0MiB / 15079MiB | 0% Default |
| | | ERR! |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

Rapids support till Python version 3.8 till date. So its better to check your python version too.

!python -V; pip -V         ##Checking python & pip versionPython 3.6.9
pip 19.3.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)

Checking CUDA version

!nvcc -V && which nvccnvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
/usr/local/cuda/bin/nvcc

Checking OS

import platform
platform.system()
'Linux'

Installation

Steps:

  1. The following commands on Colab would be self-sufficient to install the libraries.
  2. If you want to choose the default version of RAPIDS, just press ENTER when pormpted.
  3. Sip coffee. Could take around 10 mins for installations.
  4. Rapids has a variety of interesting APIs which work on GPU. Check here.
!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!bash rapidsai-csp-utils/colab/rapids-colab.sh

import sys, os

dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages')
sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages'] + sys.path[dist_package_index:]
sys.path
exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals())

Check if the following libraries are installed

import cudf
import dask_cudf
import cuml
import nvstrings
import nvcategory
import cugraph
cudf.__version__'0.13.0'dask_cudf.__version__'0.13.0'cuml.__version__'0.13.0'cugraph.__version__'0.13.0+0.gac36e8c.dirty'

Rapids libraries are available!

-Writers: Piyush Kulkarni, Apoorv Kumar, Rahul Kumar Raman

--

--

DaurEd
DaurEd

Written by DaurEd

Our objective is to be valued leader in providing quality, affordable instruction in studies via practical training, workshops, & experimental learning.

No responses yet