Search code examples
google-cloud-platformjupyterjupyter-labgoogle-cloud-vertex-ai

Is real-time collaboration supported by "user-managed notebooks" on google vertex ai?


I use GCP's vertex ai platform's "user-managed notebook" service. how do i enable real-time collaboration for the jupyter lab server? it sounds like this can be enabled by adding --collaborative when running jupyter lab. but the command is not exposed to me with vertex ai notebooks.


Solution

  • You can activate the collaboration feature by doing the following steps below:

    1. Go to GCP Console > Vertex AI > Workbench and identify the notebook you want to use.
    2. Click the notebook name to open notebook information
    3. Click "VIEW VM DETAILS"
    4. You will be redirected to Compute Engine > VM Instances and it shows your notebook details
    5. Click "EDIT" and look for the section "Metadata"
    6. Under "Metadata", click "+ Add Item" and assign value "use-collaborative" at key and "true" at value enter image description here
    7. Click "SAVE"
    8. Restart the VM by clicking "STOP" and wait for the operation to finish
    9. Click "START / RESUME" to start the VM and you should be able to use the collaboration feature.

    To share your notebook:

    1. Make sure that you give the user the correct permission in your IAM & Admin > IAM. See predefined notebook permissions.
    2. Open Jupyter lab and open a Python notebook. Copy the URL of the notebook and you could share this and be able to collaborate with users that were given the correct permissions.

      The URL is in this format https://xxxxxxx-dot-us-west1.notebooks.googleusercontent.com/lab/tree/your_sharable_notebook.ipynb

    NOTE: I tested the steps above by giving IAM permission "Notebooks Admin" to a colleague of mine.