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-gallery with local jupyterhub #62

Open
whisere opened this issue Aug 28, 2020 · 8 comments
Open

jupyter-gallery with local jupyterhub #62

whisere opened this issue Aug 28, 2020 · 8 comments

Comments

@whisere
Copy link

whisere commented Aug 28, 2020

Hello I am trying to set up jupyter-gallery with a local jupyterhub instance.

Have followed the instruction here: https://github.com/OpenHumans/jupyter-gallery

and tryied both
JUPYTERHUB_BASE_URL = http://localhost:8888
and JUPYTERHUB_BASE_URL = real IP:port

But the notebook list under gallery is still empty, and the share option is still not showing in jupyterhub notebook or lab. Anything else needs to be setup before jupyter-gallery can work with a local jupyterhub instance? Thanks.

@gedankenstuecke
Copy link
Member

Hey @whisere,
Did you follow all the setup instructions to enable the sharing in your local JupyterHub instance as well, that is enabling the 3 server extensions? In that case you should at least see the share function in your individual notebooks I think!

@whisere
Copy link
Author

whisere commented Aug 28, 2020

Thanks @gedankenstuecke I did run all the Jupyter commands successfully from the instruction here: https://github.com/OpenHumans/jupyter-gallery

jupyter bundlerextension enable --py oh_bundler
jupyter nbextension install --py oh_bundler --sys-prefix
jupyter nbextension enable --py oh_bundler --sys-prefix
jupyter serverextension enable --py oh_notebook_importer

Any others missing? I use the Jupyterhub docker with NativeAuthenticator. Thanks!

@gedankenstuecke
Copy link
Member

Did you also set the environmental variables for the connection to Open Humans? The notebooks for the Gallery are currently stored in Open Humans when being exported from the hub to act as storage backend before the public sharing. In our deployment that was easy to do as the authenticator is an OAuth authenticator that uses OH for the login (see https://github.com/wildtreetech/ohjh for our setup of the JH itself).

I fear there's some extra work needed to make it work with a different setup at the moment.

@whisere
Copy link
Author

whisere commented Aug 30, 2020

Yes I did set these variables in the .env file:
OH_ACTIVITY_PAGE='https://www.openhumans.org/activity/your-project-name-should-be-here/'
OH_CLIENT_ID='id'
OH_CLIENT_SECRET='secret'

When I click login on the gallery, it goes to OpenHuman and authorized successfully, but when coming back to the gallery front page, the login button still shows login instead of logout, and nothing changes.

And does it only work with singleuser jupyterhub image? Is it possible to work with NativeAuthenticator? Thanks.

@gedankenstuecke
Copy link
Member

Yeah, I don't think it currently works with the NativeAuthenticator, but I'd be happy to consider pull requests if you want to add that functionality :-)

@whisere
Copy link
Author

whisere commented Aug 31, 2020

No problem, will check it out, any suggestion on how to implement it? And any idea on the login issue above? Thanks.

@gedankenstuecke
Copy link
Member

For the implementation: Unfortunately not, the main thing will be to find out where to store the notebooks when they are exported, as you need some place to send them to. Right now the Gallery doesn't have it's own storage space for those.

For the .env file: Did you go to https://www.openhumans.org and register an OAuth2 application for your version of the gallery? You need to get some actual CLIENT_ID & CLIENT_SECRET etc. to make the login work.

@whisere
Copy link
Author

whisere commented Sep 1, 2020

Okay thanks, I will also look at https://github.com/wildtreetech/ohjh.

Yes I did register the OAuth2 at openhumans, and and set the client id and secret, it was authorized successfully at openhumans after clicking login at gallery, but nothing changes (login still shows login not logout) after redirected back to the gallery front page from openhumans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants