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

Enable me to explore on Jupyterhub behind reverse proxy #119

Open
MarcSkovMadsen opened this issue Oct 12, 2022 · 1 comment
Open

Enable me to explore on Jupyterhub behind reverse proxy #119

MarcSkovMadsen opened this issue Oct 12, 2022 · 1 comment
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@MarcSkovMadsen
Copy link

MarcSkovMadsen commented Oct 12, 2022

I want to try out notebooker. I don't have access to python on my laptop for enterprise reasons. I can work inside jupyterhub.

I run

mkdir -p /home/jovyan/shared/.analytics-workspace/.mongodb
conda install -y -c anaconda mongodb=6.0.2
pip install notebooker;python -m ipykernel install --user --name=notebooker_kernel
mongod --dbpath /home/jovyan/shared/.analytics-workspace/.mongodb
notebooker-cli --mongo-host localhost:27017 start-webapp --port 11828

Both mongodb and notebooker start up successfully.

The jupyter-server-proxy is installed. So I would expect to be able to try out notebooker ui at

https://domain/namespace/user/user-name/proxy/11828

image

or

https://domain/namespace/user/user-name/proxy/11828/

image

But as you can see I cannot.

The issue is that all assets are expected to be found at the root /.

image

But they should not be. Either they should be found at some nested path that I should be able to specify via a --prefix flag. Or they should be referenced as ./static I believe.

Additional Context

I often run Panel succesfully from the terminal in my jupyter hub. Panel enables me to set a --prefix that is used to point to the static assets.

image

Its the same for other data app frameworks. For example streamlit.

@MarcSkovMadsen
Copy link
Author

MarcSkovMadsen commented Oct 12, 2022

Tried out the branch on this one.

conda install -c anaconda mongodb
mkdir /home/jovyan/shared/.analytics-workspace/.mongodb
# pip install notebooker
pip install git+https://github.com/man-group/notebooker.git@support-url-prefix
mongod --dbpath /home/jovyan/shared/.analytics-workspace/.mongodb

python -m ipykernel install --user --name=notebooker_kernel
notebooker-cli --mongo-host localhost:27017 start-webapp --port 11828

But it does not work. And its actually clear. The notebook server will get a request at / when I request from /....subpath.

127.0.0.1 - - [2022-10-12 15:45:46] "GET / HTTP/1.1" 404 331 0.001531

The issue to be solved is the link to the assets. It needs to be available at ./static not /static.

(I forgot. I don't use --prefix for Panel, Streamlit etc. when running on jupyterhub. It just works).

I hope though that the url-prefix will make a difference when deployed to kubernetes.

@jonbannister jonbannister self-assigned this Nov 21, 2022
@jonbannister jonbannister added bug Something isn't working question Further information is requested labels Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants