I would like to inquire about how to run user notebooks in a web browser while in API only mode.
I’m interested in using JupyterHub’s API only mode to enable users to run their individual single-user JupyterLab servers.
I’ve configured the environment on AWS EKS by referring to “Zero to JupyterHub with Kubernetes.”
- helm chart version 3.0.3
I followed the steps below:
-
After configuring
config.yaml
as shown below, I logged in as the root user and generated an API Token.hub: config: Authenticator: admin_users: - root
-
To use API Only mode, I changed the Authenticator to NullAuthenticator.
I modifiedconfig.yaml
as follows and performed ahelm upgrade
.hub: config: JupyterHub: authenticator_class: "null"
-
I have successfully achieved the following workflow to obtain a user’s server URL through API calls:
- User creation
POST HUB_URL/hub/api/user/{user_name}
- User API token creation
POST HUB_URL/hub/api/user/{user_name}/tokens
- User server creation
POST HUB_URL/hub/api/user/{user_name}/server
- Obtaining the user server address and checking its status
GET HUB_URL/hub/api/user/{user_name}
- User creation
-
After confirming that
servers.ready
has become true in step 3.4, I attempted to run JupyterLab in the browser using the following user server URL:HUB_URL/user/{user_name}/?token={user_api_token}
JupyterLab runs as expected, but icons are broken, and when I inspect the developer tools, I see websocket connection failures.
Could you please assist me in identifying where I might be going wrong? Your help would be greatly appreciated.