Open Jupyter Lab on Google Cloud VM

How to open a Jupyter Lab or Juyter Notebook on a Google Cloud Machine
Author

Kedar Dabhadkar

Published

February 22, 2021

Step 1. Install Google Cloud

Follow the instructions to install Google Cloud SDK here: https://cloud.google.com/sdk/docs/install#mac

Step 2. Sign in into Google Cloud from the CLI and set a default project

gcloud init

Step 3. Provision a VM from the Google Cloud Console

https://console.cloud.google.com/home/dashboard

Step 4. Enter this command to connect to VM from the terminal

gcloud compute ssh {instance-name} --ssh-flag="-L 8888:localhost:8888"

Step 5. Launch Jupyter Lab from the instance

jupyter lab --port=8888