pythongoogle-colaboratorynvidiarapids

Issue in Installing NVIDIA Rapids on Google Colab


I'm trying to install NVIDIA Rapids on Google Colab's Tesla P-100CE using the below provided by NVIDIA.

# Installing RAPIDS API.
# NOTE : This may take some few minutes to install.

!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!bash rapidsai-csp-utils/colab/rapids-colab.sh stable

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())

After this gets executed I get an error like below :

************************************************
Your Google Colab instance has RAPIDS installed!
************************************************
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-bdfa5194a5f0> in <module>()
      5 import sys, os
      6 
----> 7 dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages')
      8 sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages'] + sys.path[dist_package_index:]
      9 sys.path

ValueError: '/usr/local/lib/python3.6/dist-packages' is not in list

Has anybody faced this error in Google Colab ? How can this issue be resolved ? Any help here is appreciated.

Thanks


Solution

  • Update 5/14/24:

    cuDF and cudf.pandas now comes preinstalled on Google Colab's GPU instances. You can still pip install the rest of the RAPIDS libraries, such as cuML, cuGraph, cuXfilter, and cuSpatial, onto your GPU enabled Colab instance using the RAPIDS+Colab Pip Installation Template

    Previously:

    We recently pushed an update that allows the most recent RAPIDS to install on Colab. You can run RAPIDS 0.18 and 0.19 now, as normal. Some changes to the install script cell may need to made, but are documented in our text printout. Try it out! :)