Enable Colaboratory to Use Local Runtime

 

Enable Google Colaboratory to use local runtime through Jupyter Notebook.

Install Jupyter Notebook

1
$ sudo pacman -S jupyter-notebook

Enable interactive Javascript widgets in the notebooks:

1
$ sudo jupyter nbextension enable --py --sys-prefix widgetsnbextension

Install and enable the jupyter_http_over_ws jupyter extension

1
2
$ sudo pip install jupyter_http_over_ws
$ jupyter serverextension enable --py jupyter_http_over_ws

Start server and authenticate

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

Connect to the local runtime

In Colaboratory, click the “Connect” button and select “Connect to local runtime…”

Note:

If you use firefox, you must set the network.websocket.allowInsecureFromHTTPS to be true.

In the address bar, type about:config and press Enter, then type network.websocket.allowInsecureFromHTTPS and set its value to be true.

References: