Hi,
My goal is to run both JupyterHub and the SingleUser servers in API only mode. I have not been able to do so for either and any guidance would be greatly appreciated. Does anyone have any tips on what I could do to put JupyterHub and SingleUser server in API only mode?
Here is what I have tried so far
For JupyterHub
I have read through the following:
This is what my values.yml looks like:
singleuser:
storage:
...
cmd:
- jupyterhub-singleuser
- "--ip=0.0.0.0"
- '--ServerApp.allow_origin="http://localhost:3000"'
- "--ServerApp.allow_credentials=True"
- "--NotebookApp.allow_origin=http://localhost:3000"
- "--NotebookApp.allow_credentials=True"
extraEnv:
JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp"
image:
name: ...
tag: ...
imagePullSecret:
create: true
registry: ...
username: ...
password: ...
email:
hub:
config:
JupyterHub:
hub_routespec: "/hub/api"
However, after applying this using helm upgrade
, when I navigate to my JupyterHub, I still get the login screen presented:
SingleUser Server API Only mode
To make the Single User Server API only, I tried to modify the following Docker image to make it so that it ran jupyter server
instead of jupyter lab
.
Since that did not work, I tried to edit the values.yml
to run jupyter server
instead:
cmd:
- "jupyter"
- "server"
- "--ip=0.0.0.0"
- '--ServerApp.allow_origin="http://localhost:3000"'
- "--ServerApp.allow_credentials=True"
- "--NotebookApp.allow_origin=http://localhost:3000"
- "--NotebookApp.allow_credentials=True"
Although this successfully runs the server, the CORS options I set are seeminly ignored when trying to access the Jupyter Server API, likely because I am connecting through the hub URL and jupyter server
is not proxying correctly.
I looked through jupyterhub-singleuser
and realized that it always seems to create a UI: https://github.com/jupyterhub/jupyterhub/blob/7bf4efd3f814d24481bc755462723740c3f8c900/jupyterhub/singleuser/mixins.py#L950
Is there a way to put jupyterhub-singleuser
in API only mode as well?
I know this was long so I really appreciate all your time if you made it this far