Voila: Voila with jupyterlab and jupyterhub

Created on 21 Oct 2019  路  12Comments  路  Source: voila-dashboards/voila

Hi! Thank you for great project!

I have jupyterlab behind jupyterhub. It's one docker container and users have access to terminal. Is there a way to allow users create voila dashboards and share it 1. inside jupyterhub 2. outside jupyterhub?

Thanks!

Most helpful comment

If everything is in one Docker container then there could be a separate Voila process running in the container that serves the dashboards. And that would be outside JupyterHub.

We're still working on native Voila support within JupyterHub (for example being able to run Voila as a named server per user, or having a Voila service for JupyterHub). In the meantime users can still use the server extension endpoint.

All 12 comments

If everything is in one Docker container then there could be a separate Voila process running in the container that serves the dashboards. And that would be outside JupyterHub.

We're still working on native Voila support within JupyterHub (for example being able to run Voila as a named server per user, or having a Voila service for JupyterHub). In the meantime users can still use the server extension endpoint.

I was going to reference https://github.com/voila-dashboards/voila/issues/112 but it seems like you posted the last message :)

If everything is in one Docker container then there could be a separate Voila process running in the container that serves the dashboards. And that would be outside JupyterHub.

We're still working on native Voila support within JupyterHub (for example being able to run Voila as a named server per user, or having a Voila service for JupyterHub). In the meantime users can still use the server extension endpoint.

What do you mean by that endpoint? If I run voila inside my bash on jupyterlab it seems to work ok, but nothing happens.

The endpoint that is added to the notebook server (and should be enabled automatically when installed).

So that JupyterLab is available with /lab and Voila with /voila: https://voila.readthedocs.io/en/latest/using.html#as-a-jupyter-server-extension

@jtpio great thanks!

Is there a way to set restrictions? For example there are 3 data scientists who use /lab and there are many users who want to review notebooks in folder shared from /voila path. Data scientists place the notebooks to shared folder and send the links to users.

I already use oauthenticator.google to authorize a few data scientists in the /lab. Can I set different users list for /voila?

@anki-code Do the data scientists and users share the same hub? One option could be to implement a custom Spawner and add the logic there.

@jtpio yep. Data scientist just makes simple notebook for results and wants to share it via voila. It will be great if data user can see only the notebooks were shared and pass thru authorization for that.

@jtpio I have exactly this use-case and I'm happy to try and crank out a custom server as you recommend. Checking the user info to determine whether a regular single-user server vs. a voila-ified one should be launched seems straightforward enough. I'm a bit unclear as to what exactly the spawner launch cmd needs to look like to achieve voila-ificiation. Can you point me along the way? Cheers.

@jtpio something similar to the way Voila Gallery presents and runs notebooks with Voila (with authentication prior) would be ideal. Any setup and configuration details from Voila Gallery would help, if you can share those.

Referring to https://github.com/wildtreetech/ohjh/blob/master/images/user/Dockerfile#L29 I see:

RUN echo "c.ServerProxy.servers = {" >> /etc/jupyter/jupyter_notebook_config.py
RUN echo "'voila': {" >> /etc/jupyter/jupyter_notebook_config.py
RUN echo "'command': ['voila', '--port', '{port}', '--server_url', '/', '--base_url', '{base_url}/voila/']}}" >> /etc/jupyter/jupyter_notebook_config.py

which goes a long way to show how to do this.

@dschofield the configuration for running the gallery as a plugin for The Littlest JupyterHub (TLJH) is in this repo: https://github.com/voila-dashboards/gallery

This is the same configuration as the one used by the public-facing gallery. But it still spawns one notebook server per user, with the voila server extension enabled.

Checking the user info to determine whether a regular single-user server vs. a voila-ified one should be launched seems straightforward enough. I'm a bit unclear as to what exactly the spawner launch cmd needs to look like to achieve voila-ificiation.

Starting one instance running voila standalone per user, not one single instance running voila standalone shared by all the users?

My ContainDS Dashboards project sounds perfect here.

It is an extension for JupyterHub that allows users to instantly and securely clone a Jupyter notebook into a separate Voila server, accessible to other authenticated users of JupyterHub.

Non-technical users can interact with the Voila front-end without having to step through code, or being able to switch to the /tree URL to expose the regular Jupyter development environment.

Instructions are here: https://cdsdashboards.readthedocs.io/en/stable/index.html

At the moment, the default is for sharing internally within JupyterHub, but it would be possible to configure it to display publicly. Please get in touch if you would like to discuss further or need any help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericmjl picture ericmjl  路  9Comments

choldgraf picture choldgraf  路  8Comments

jeiche picture jeiche  路  8Comments

paugier picture paugier  路  6Comments

mcornudella picture mcornudella  路  6Comments