Skip to content

Instantly share code, notes, and snippets.

@kayush2O6
Last active May 10, 2021 06:21
Show Gist options
  • Save kayush2O6/c9b81a25062ddb1616e6f6d8ff767093 to your computer and use it in GitHub Desktop.
Save kayush2O6/c9b81a25062ddb1616e6f6d8ff767093 to your computer and use it in GitHub Desktop.
rapids'cuml on google colab
BEFORE INSTALLING THE CUML, PLEASE MAKE SURE YOU HAVE FOLLOWED THE ABOVE STEPS FOR CUDF. CUDF SHOULD BE WORKING...
Step 1: Install the cuml and its depandencies.
!apt install libopenblas-base libomp-dev
!pip install cuml-cuda100
# import cuml at this point, will give libcuml.so not found error. #
NOTE: Step2 is optional and is just for information, you can fast forward to Step3 directly to work quickely.
Step 2: find the location of libcuml.so
!find / -name libcuml.so*
# You should get something like this: /usr/local/lib/python3.6/dist-packages/libcuml.so #
**IMPORTANT**: At this point, if you are using terminal, then you update the $LD_LIBRARY_PATH environment variable
with the location of libcuml.so, and it will work.
checkout out my git comment regarding this: https://github.com/rapidsai/cuml/issues/404#issuecomment-487054041
But, jupyter notebook load this $LDLIBRARY_PATH at the start time only, so even if you update the LD_LIBRARY_PATH in notebook
cell, it will not be loaded by notebook.
Step 3: 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, you can use import cuml and run you code.
@kayush2O6
Copy link
Author

Hi @tonewhoo @TaherLkdw, I am afraid these instructions are obsolete now.

Please refer these new instructions mentioned in official page of rapids.ai colab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment