Appmode for JupyterHub

Hi everyone.

Has anyone gotten the appmode notebook extension to work with JupyterHub?

It works locally, but it seems that some routing configuration is needed so that JupyterHub knows what to do with the path, which looks like this:

/user/[username]/apps/[notebook_name].ipynb

JupyterHub gives a 404 (we’re using tljh for now)

Thanks!
Geir

Hey @geirfreysson - have you looked into voila? It’s similar to appmode and a bit more well-maintained. We’ve gotten it working on TLJH as well.

1 Like

Maybe taking a look at https://github.com/binder-examples/appmode helps figure out the bits you need. This runs appmode on a BinderHub, which is just a JupyterHub with some extra stuff added to it.

HTH

Hi @choldgraf, I have heard of voila and we looked into it quite a bit. It seemed to me that the maintainers were working on integrating with jupyterhub so we thought we’d use appmode in the meantime (mainly because we don’t want the dashboards to be available to the outside world).

Did you get it to work with user authentication and all the rest?

Thanks for the tip, @betatim! We’ll look there and see how the binder folks did it, I’m sure the solution is there somehwere :+1:

Maybe you already have this covered, but I noticed this when looking into whether my own appmode uses worked & were utilizing current approaches…
I note that in the binder repo at the official appmode repo, the author included a couple of lines in postBuild about enabling appmode for nbextension and serverextension. While the official binder example repo doesn’t include this now and works without it, the appmode author had once thought addressing these items should be included. And so maybe when a JupyterHub doesn’t have the special stuff BinderHub has, you need that, too?

Hi @fomightez, thanks for the pointer.

I think that we already have that part covered, we at least ran those two lines

jupyter nbextension enable --py --sys-prefix appmode
jupyter serverextension enable --py --sys-prefix appmode

as the super user on the JupyterHub (and the first one certainly worked as the appmode button becomes available).

My inkling is that the problem is that jupyter notes/lab has a different URL/path structure than JupyterHub and I need to make appmode aware of that somewhere. I’ll hopefully figure it out when I look at how binder does it.

We use appmode with jupyterhub and it works well. Looks like the above two commands should do it. Do other extensions work on the jupyterhub or is it just appmode that is not showing up for you?

Hi, @Leonard_Nelson. I guess we’ll have to double check that we’ve run the commands in the right places with the right privileges. All other extensions work (ipywidgets, ipysheets, qgrid, etc) and it seems to be only the serverside of appmode that doesn’t work (the button shows up).

We’ll try running the commands again.