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

Install colab for offline use? #1374

Closed
MyFakeHub opened this issue Jun 29, 2020 · 8 comments
Closed

Install colab for offline use? #1374

MyFakeHub opened this issue Jun 29, 2020 · 8 comments

Comments

@MyFakeHub
Copy link

I would love it if I could download and install a colab package that lets me run local notebooks like jupyter.

Is there a way to do that? Is there a package I can install like pip install colab and then I could run colab notebook from terminal to run locally and offline my python notebooks?

@craigcitro
Copy link
Contributor

There's no way to run the colab frontend locally.

If you'd like to use the colab frontend with a local runtime, see: https://research.google.com/colaboratory/local-runtimes.html

@lnryan
Copy link

lnryan commented Mar 2, 2022

Hello,

The only thing our team really needs from the collab libraries is the auth module as we want to preserve the individual login/token interaction and have this be specific to the individual's access rights (ie rather than binding to a service user).

Is there an alternative google library that provides the same functionality?

Note: I can respect that the collab team wants to encourage use of their in-the-cloud product; however we found it did not work well for our team within a large organization because the repo selection interface is buggy and assumes a separate repo for notebooks rather than notebooks within a related mono repo.

@jwvanderbeck
Copy link

So then how are we supposed to enable third party widgets when running locally if we can't run the colab module locally?

#@title Enable third party widgets
from google.colab import output
output.enable_custom_widget_manager()

I need to be able to run that but can't because I can't install colab package?

@100rab-S
Copy link

@jwvanderbeck Exactly!
In my case, I'm trying to use tqdm in notebook mode, which btw works fine with Jupyter Notebooks.
from tqdm.notebook import tqdm

But the notebook mode of tqdm does not work on the local colab connection. For that, I need to run

from google.colab import output
output.enable_custom_widget_manager()

Since the google package here is not available locally. I'm unable to...

@craigcitro What do we do here?

@sebbov
Copy link

sebbov commented Jul 28, 2023

If you can use Docker, try the Colab Docker runtime image option at https://research.google.com/colaboratory/local-runtimes.html. As explained there, the resulting runtime will include packages found in our hosted environment.

@100rab-S
Copy link

Thanks for the quick reply @sebbov
I tried the Colab Docker Runtime Image option. But it completely fails the motivation for local setup in the present stage.

  1. I can't serve notebook from a particular directory.
  2. I cannot use local packages and files.
  3. etc etc

So no, I cannot use this approach. I use Colab as an alternative for Jupyter Notebook due to its design and handy keyboard shortcuts.
Is there any other way I can solve the before mentioned problem?
Also why is the colab package not available as an open-source? It has some great UI features and resource utilization monitor. It would have been great if it can do the same in a local setup 🤩.

@sebbov I am willing to invest time to make it work if there is a way to bring the hosted features into a local setup. Please inform me if there is any possibility in this direction.

@sebbov
Copy link

sebbov commented Jul 31, 2023

There are no plans of open sourcing the colab package, or offering hosted features in the local setup besides Docker in general. In case you give it another look, Docker has options that may help with the limitations you perceived. You can for instance map files from the host to the container, install packages in the runtime and keep those around across reboots, extend the image using your own Dockerfile, etc. Nothing Colab specific -- Docker tutorials should be helpful. It is a larger effort than just being able to install colab in your situation, unfortunately.

@100rab-S
Copy link

100rab-S commented Aug 1, 2023

@sebbov Thanks for clarification. Okay I'll look into it and see if I can make it work as required.

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

6 participants