I just created a VM instance with deep-learning-vm image provided by GCP. I am trying remote access to notebook server. However I realized jupyter notebook server starts the moment I start the VM. I can use the external_ip:8888 to connect the VM's jupyter notebook server.
There is 1 issue with his. Normally when we start jupyter notebook server manually it provides us a login token. In this case I do not know what the token is.
Second issue is when i do jupyter notebook list to see running servers, i see nothing. I tried with sudo user as well. There is no trace of a running server. However I can connect to login page of jupyter server regardless. Also when i check the ports using lsof -i, I can see jupyter is listening even tho I did not started it manually.
i tried to to kill the ports but they start again after seconds. I dont understand how I am suppose to use the jupyter server without token information. I tried to setup a password but it did not worked.
I tried changing the user, killing the ports, manually running the server using jupyter-lab. However these did not help me
There is some assumptions that need clarification.
systemctlservice. The Jupyter service is defined here:/lib/systemd/system/jupyter.serviceYou can access JupyterLab through a Proxy URL provided by Google. Jupyter Service binds to local IP address (127.0.0.1) and port (8080) and does not use a token.
To track Jupyter status use:
systemctl status jupyter.serviceExample:
Is a not a good security practice to start JupyterLab manually and use an external IP address. This is why we provide a Proxy URL or recommend SSH access.
You can explore User Managed Notebooks which uses the same underlying OS as the Deep Learning VM image:
https://cloud.google.com/vertex-ai/docs/workbench/user-managed/create-new
https://cloud.google.com/deep-learning-vm/docs/cli