Connecting to JupyterLab

When you start an AI Platform Deep Learning VM Image instance, a JupyterLab session is initialized.

Follow these steps to set up SSH port forwarding and then access your JupyterLab session through a local browser:

  1. Type the following command in either Cloud Shell or a local environment where the Cloud SDK is installed. Replace MY_PROJECT_ID, MY_ZONE, and MY_INSTANCE with the relevant information.

    export ZONE="MY_ZONE"
    gcloud compute ssh --project $PROJECT_ID --zone $ZONE \
      $INSTANCE_NAME -- -L 8080:localhost:8080
  2. If you ran the command on your local machine, visit https://localhost:8080 to access JupyterLab.

    If using Cloud Shell, access JupyterLab through the Web Preview on port 8080. The Web Preview button Web Preview Button can be found on the top right of the Cloud Shell taskbar.