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.
Asked
Active
Viewed 1,387 times
3

william_grisaitis
- 5,170
- 3
- 33
- 40
1 Answers
4
You can activate the collaboration feature by doing the following steps below:
- Go to GCP Console > Vertex AI > Workbench and identify the notebook you want to use.
- Click the notebook name to open notebook information
- Click "VIEW VM DETAILS"
- You will be redirected to Compute Engine > VM Instances and it shows your notebook details
- Click "EDIT" and look for the section "Metadata"
- Under "Metadata", click "+ Add Item" and assign value "use-collaborative" at key and "true" at value
- Click "SAVE"
- Restart the VM by clicking "STOP" and wait for the operation to finish
- Click "START / RESUME" to start the VM and you should be able to use the collaboration feature.
To share your notebook:
- Make sure that you give the user the correct permission in your IAM & Admin > IAM. See predefined notebook permissions.
- 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.

Ricco D
- 6,873
- 1
- 8
- 18
-
1Worked for me, thanks. Worth noting that the keys are case sensitive. – Anonymous Apr 20 '22 at 08:23
-
Thanks! One question: what is the IAM step for? In the past, I think I've been able to share notebooks (running on vetrex ai) by just sending someone the URL. They didn't have to be IAM privileged to load it, I don't think. Was this not the case? Maybe the url had an access token? – william_grisaitis Apr 29 '22 at 07:04
-
1@william_grisaitis Hmm I haven't tried that. I assumed that to be able to access a notebook hosted in your project, they should be granted notebook related permissions as well. I'll let you know when I confirm this. – Ricco D Apr 29 '22 at 07:07
-
trying this today, I don't see a "VIEW VM DETAILS" option anywhere, although it is on a managed notebook – sanminchui Aug 25 '23 at 14:17