Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Google Colab as an alternative to MyBinder #25

Open
jcohenadad opened this issue Dec 10, 2021 · 3 comments
Open

Consider Google Colab as an alternative to MyBinder #25

jcohenadad opened this issue Dec 10, 2021 · 3 comments

Comments

@jcohenadad
Copy link
Owner

No description provided.

@po09i
Copy link
Collaborator

po09i commented Dec 1, 2022

The biggest problem seems to be that colab does not support creating environment for specific notebooks. I tried to remedy this by including some code in a cell but that's not ideal. It is possible to download and install dependencies from a cell but if we change python interpreter, we need to restart the kernel.

Now that we have fixed myBinder in #30, I don't think it's worth moving towards colab.

@jcohenadad
Copy link
Owner Author

The biggest problem seems to be that colab does not support creating environment for specific notebooks.

When running a notebook under colab, a new environment is created. Then, dependencies can be installed with pip, exactly like with MyBinder. Example:

!pip install tensorflow

If there are conda deps (which seems to be the case here), here are some instructions (disclaimer: I have not tested).

But if the MyBinder option is fixed, I guess there is no need in pursuing the Google colab approach so we can lower the priority on this issue. The only problem, though is that it takes a very long time to load MyBinder (see #30 (review)), so I suggest we keep this issue open in case colab happens to be much faster.

@po09i
Copy link
Collaborator

po09i commented Dec 1, 2022

Yes I tried similar approaches. The code you linked seems promising. I modified it so that is uses the latest python 3.6 version:

################################################################################
# INSTALL CONDA ON GOOGLE COLAB
################################################################################
! wget https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
! chmod +x Miniconda3-4.5.4-Linux-x86_64.sh
! bash ./Miniconda3-4.5.4-Linux-x86_64.sh -b -f -p /usr/local
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')

We would then need to install the dependencies:

  • git clone then install a requirement file (The current file creates an environment, from what I know, that's not supported, we need to stick to the one created in base).
  • put the dependencies directly in the cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants