Rapids on google colab
an introductory guide to help run the rapids on google colab
If rapids is a new words to your vocabulary, I suggest, go through some of beautiful blogs posted official rapids channel.
If you have tried running rapids on colab, then you know that how frustrating it is.
I have written down the steps which I have figured out during my endeavour to run rapids on colab. Hope it helps and save your some time.
Step1: First of all, just verify that you have all requirement satisfied, needed by rapids.
- Check the gpu card (>=Pascal arch)
!nvidia-smi
Note: if you see gpu architecture Tesla K80, then you need to change the runtime until you get the Tesla T4.
- Check CUDA version installed (>=9.2)
!nvcc -V
- Check the python and pip version (python==3.6)
!python -V; pip -V
cudf on colab:
Step 2: Install the cudf and make some adjustment in order to make it work.
!pip install cudf-cuda100
If you try to import cudf at this point, it will give you, librmm.so not found error.
- copy this librmm.so to your current working directory:
!cp /usr/local/lib/python3.6/dist-packages/librmm.so .
At this point you will be able to import cudf. But while running some code, it will give errors.
Step 3: Here you have to set the path for NVVM. copy and paste the below lines to notebook cell.
import os
os.environ['NUMBAPRO_NVVM']='/usr/local/cuda-10.0/nvvm/lib64/libnvvm.so' os.environ['NUMBAPRO_LIBDEVICE']='/usr/local/cuda-10.0/nvvm/libdevice'
Finally, it’s all done and you can run your code.
cuml on colab:
Step 1: Install the cuml and its depandencies.
# installing cuml dependencies
!apt install libopenblas-base libomp-dev # installing the cuml
!pip install cuml-cuda100
- import cuml at this point, will give libcuml.so not found error.
Step 2: In order to solve this issue in colab, run the below command.
!cp /usr/local/lib/python3.6/dist-packages/libcuml.so /usr/lib64-nvidia/
Now, it’s done for cuml too, you can run the code.
Here is the running notebook…https://colab.research.google.com/drive/1OqZFKkkyVthnB-Qz-ukb61CM4yKzke_Y
If you run into any issue or want to share some suggestions, comments are always welcome, Thanks you :)