voila-dashboards / tljh-voila-gallery

Configuration for deploying the Voilà Gallery with The Littlest JupyterHub
BSD 3-Clause "New" or "Revised" License
82 stars 70 forks source link

Access of shared data in notebooks #60

Open seidlr opened 5 years ago

seidlr commented 5 years ago

I currently use TLJH to host some notebooks with voila. They access shared data from the folder /srv/data/ as described here. The notebook repositories are also stored locally on the server under /srv/repositories/ and I wonder if I could still access the local data in the notebooks when they are served with voila-gallery. What do you think?

jtpio commented 5 years ago

I think it would be good to have support for this.

For now the examples are isolated from each other and they each have their own Docker image.

Maybe we could make this /srv/data folder available as a volume to the containers?

seidlr commented 5 years ago

This would be great!

jtpio commented 4 years ago

@seidlr another way that should also work is to provide a custom jupyterhub_config.py snippet, and place it in /opt/tljh/config/jupyterhub_config.d/. There is some documentation about this here:

https://tljh.jupyter.org/en/latest/topic/escape-hatch.html#custom-configuration-snippets

The volume mapping could then be defined in the snippet, with something like the following:

c.DockerSpawner.volumes = { '/srv/data': 'home/jovyan/data' }
seidlr commented 4 years ago

@jtpio That sounds great. I'll give it a try!