How to: Connecting a Instance (Virtual Machine from Google Cloud Service) with local runtime from Google Colab

Viewed 1976

I just struggled for 3 days to get this to work but many of the sources that explain it are somehow misleading. Therefore I share that now. I was using windows and used the Windows 10 Subsystem for Linux to operate from there: (instruction on how to activate you can find here https://docs.microsoft.com/en-us/windows/wsl/install-win10)

(In the connected terminal from the VM)

sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python-pip 

- Install jupyter_http_over_ws

sudo -i pip install jupyter_http_over_ws 

- Run the jupyter-server still on the connected VM:

jupyter serverextension enable --py jupyter_http_over_ws

jupyter notebook \

--NotebookApp.allow_origin='https://colab.research.google.com' \

--port=8888 \

--NotebookApp.port_retries=0

(this should be also a code cell - but the formatting doesn't let me)

I hope this saves some people some time.

The original sources are from here: https://research.google.com/colaboratory/local-runtimes.html https://medium.com/@yufengg/how-to-upgrade-colab-with-more-compute-64d53a9b05dc (but somehow it confused me and it didn't work for me at least)

0 Answers
Related