Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter Hub support #191

Open
bugzpodder opened this issue Jan 29, 2024 · 6 comments
Open

Jupyter Hub support #191

bugzpodder opened this issue Jan 29, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation feature New feature or request

Comments

@bugzpodder
Copy link

I was playing around with my local jupyterhub and couldn't get jupyter-ui to work. It seems that from
https://jupyter-ui.datalayer.tech/docs/deployments/jupyterhub/
this is not currently supported?

@echarles
Copy link
Member

Hi, it is supported, but we need to document that.

@bugzpodder
Copy link
Author

any tips on how to set it up?
I am looking at https://jupyterhub.readthedocs.io/en/stable/reference/rest-api.html and it doesn't have some of the apis that jupyter server is calling, like /api/kernelspecs

Screenshot 2024-01-29 at 2 19 31 PM

@echarles
Copy link
Member

jupyter-react is already a jupyter-server extension. So it supports the authentication used by juptyerhub.

You need to pip install -e . this repo, the use jupyter react command (it is not fully working on my env to render correctly the notebook, it was I think before).

Then you would need to enroll the new command in jupyterhub. That is possible as vscode e.g. can be served by jupyterhub.

There is the spawner road https://jupyterhub.readthedocs.io/en/stable/reference/spawners.html where you would create a new spawner, maybe overkill. I don't find atm how to override the launch command, that maybe possible, not sure anymore.

@echarles
Copy link
Member

There is also https://github.com/ideonate/jhsingle-native-proxy to launch any process, but I think it does not support the latest jupyterhub version. This one https://github.com/nebari-dev/jhub-apps may offer similar features but updated to latest jupyterhub.

I am lacking time atm, I am pretty sure there is a way to make it easy to change the launcher command.

@echarles
Copy link
Member

This can be useful https://jupyterhub.readthedocs.io/en/stable/howto/configuration/config-user-env.html#switching-back-to-the-classic-notebook You can use JUPYTERHUB_SINGLEUSER_APP and set your own python module to launch what you want.

@echarles
Copy link
Member

I have pushed e6a4f4a which restore the behavior when you launch with jupyter react - The defined application in webpack.config.js is accessible on http://localhost:8888/jupyter_react

Screenshot from 2024-01-30 08-06-58

I have then updated my jupyterhub_config.py with c.Spawner.default_url = '/jupyter_react' The result is promising, there are some javascript that need to be correctly loaded, which can be fixed in the index.html template adding the correct base_url.

Screenshot from 2024-01-30 08-06-48

@echarles echarles added feature New feature or request documentation Improvements or additions to documentation labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants