RTC Jupyterlab in the Cloud
Jupyter notebooks have been a huge productivity boost for machine learning researchers. They are a great way to share code, and to share ideas. Still, it’s only been recently that they have introduced support for realtime collaboration. I have written this post as a tutorial to help you get started with realtime collaboration using Jupyter lab on AWS and GCP.
According to gpt3:
## What is Jupyter lab?
Jupyter lab is a Jupyter notebook extension that allows you to run Jupyter notebooks in realtime. It is a Jupyter notebook server that runs on your local machine, and it is connected to a Jupyter notebook server on a remote machine.
## What is realtime collaboration?
Realtime collaboration is the ability to run Jupyter notebooks in realtime. Jupyter notebooks are run on your local machine, and Jupyter notebooks are connected to a remote Jupyter notebook server. The remote Jupyter notebook server is the one that is running on your machine.
## What is GCP?
Google Cloud Platform is a cloud computing platform that provides a set of open-source software tools for developers to build, deploy, and manage their cloud computing resources.
## What is AWS?
Amazon Web Services is a cloud computing platform that provides a set of open-source software tools for developers to build, deploy, and manage their cloud computing resources.
AWS
- Create an ec2 instance with the deep learning image
- Create a security group that allows all inbound traffic on ports 22 (ssh) and 8888 (jupyter lab) and allows all outbound traffic on all ports.
- Open a local terminal and ssh into the instance
- Run the following command to start jupyter lab
jupyter lab --ip=0.0.0.0 --port=8888 --collaborative
- Copy and paste the URL that the jupyter lab server pits out into your browser but replace
https://localhost
with the ephemeral ip address of the instance. Make sure to use the port 8888. - Troubleshooting: sometimes, I have to explicitly reassign the security group.
- Terminate the instance when you are done.
GCP
- Create a GCP project and request a GPU quote increase
- Create a GCP compute engine instance with the deep learning image
- Run the following command to start jupyter lab
jupyter lab --ip=0.0.0.0 --port=8888 --collaborative
- Copy and paste the URL that the jupyter lab server pits out into your browser but replace
https://localhost
with the ephemeral ip address of the instance. Make sure to use the port 8888. - Troubleshooting: sometimes, I have to explicitly run a network analysis on port 8888 on the instance.
- Delete the instance when you are done.