Open sohailiqbal opened 3 years ago
Yes, as long as Google colab will allow you to run the commands git, cmake, apt, make, nvcc, python3, pip3 etc you can build as you would on a local machine.
Building from source is very consistent. This is how you would install the python bindings of ripser++ in Google colab:
To use GPU on Google Colab, create a new notebook. Then runtime-> change runtime type-> GPU
In this fresh notebook, run the command !pwd
. It should say /content. If not, then run:
import os
os.chdir('/content')
!git clone https://github.com/simonzhang00/ripser-plusplus.git'
!apt update
!apt install -y cmake
import os
os.chdir('/content/ripser-plusplus/python/bin')
!pwd
!cmake /content/ripser-plusplus/python && make
!pip3 install /content/ripser-plusplus/python/
import os
os.chdir('/content/ripser-plusplus/python/working_directory')
!pwd`
!python3 "examples.py"
Don't forget, if you want to remove verbosity, uncomment the two lines:
#define PROFILING
#define COUNTING
from ripser++.cu and don't forget that uncommenting
#define ASSEMBLE_REDUCTION_SUBMATRIX
may give better performance.
Here is gist of the above instructions: Google colab gist
Good luck and have fun!
Hello, thanks for the guide.
at step 5, I face the issue that folder /python
is not created in ripser-plusplus
. Any hints in that?
FileNotFoundError: [Errno 2] No such file or directory: '/ripser-plusplus/python/bin'
These instructions are old, ripser++ has been updated. To install ripser++ just use: pip3 install ripserplusplus
or pip3 install git+https://github.com/simonzhang00/ripser-plusplus
or clone the repository and follow the instructions in the main README.md.
pip3 install ripserplusplus
Hello, This still doesn't seem to work. Please check the notebook below for details: https://github.com/sava-1729/practice/blob/master/ripser.ipynb
Edit: One needs to enable GPU in the notebook menu: Runtime -> Change Runtime Type -> Hardware Accelerator -> GPU And after that it gets installed perfectly. Check the notebook below for details: https://github.com/sava-1729/practice/blob/master/ripser_with_gpu.ipynb
Is it possible to run this library in google colab.