Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run google colab from terminal?

I am running a deep learning model in google colab and it works fine with colab notebook. The problem is as the training of deep learning model progresses in the cloud colab notebook, my own computers cpu and memory usage also starts to go up. The RAM usage for the colab notebook browser window alone is more than 500 MB and it keeps climbing as the training progresses.

In google colab we have to keep open our running notebooks to train the model else we will lose all our previous work and it stops training. Can I run google colab from my terminal window instead of browser? Is there any way to force google colab to run in the cloud alone, that is, to run the notebook without opening the computer?

like image 353
Eka Avatar asked Apr 28 '18 10:04

Eka


People also ask

How do I run a Colab command in terminal?

It's already possible to run terminal commands in a Colab notebook — all you need to do is prepend an exclamation to the command, or use the %%shell command, but sometimes you might prefer the convenience an interactive shell.

How do I run Google Colab?

To execute the code in the above cell, select it with a click and then either press the play button to the left of the code, or use the keyboard shortcut "Command/Ctrl+Enter". To edit the code, just click the cell and start editing.

How do I open Colab console?

To simply have all the cells run automatically, click Runtime > Run all in the colab toolbar.


1 Answers

Instructions for local execution are available here:

http://research.google.com/colaboratory/local-runtimes.html

If you combine these with an SSH tunnel, you can run the backend on your own GCE VMs, AWS, or anywhere else you like.

like image 184
Bob Smith Avatar answered Oct 08 '22 19:10

Bob Smith