Connect colab to local runtime

Connect your colab to local runtime

Purpose of the blog:

Connect your colab to local runtime

Resources

Link can be found here at cartoon-gan paper.

Prerequisites

Make sure you have jupyter installed in your local machine. If not here is a link to install jupyter

Step 1

Install and enable the jupyter_http_over_ws jupyter extension (one-time) The jupyter_http_over_ws extension is authored by the Colaboratory team and available on GitHub.

pip install jupyter_http_over_ws
jupyter serverextension enable --py jupyter_http_over_ws

Step 2

Start server using following command

jupyter notebook \
  --NotebookApp.allow_origin='https://colab.research.google.com' \
  --port=8888 \
  --NotebookApp.port_retries=0

Once the server has started, it will print a message with the initial backend URL used for authentication. Make a copy of this URL as you’ll need to provide this in the next step.

Final step

Go to colab and select the option to connect to runtime at the top right of the browser. Paste above url and click connect

Result

Written on July 19, 2020