Skip to content

Notes for setting up JupyterHub with custom authentication, and using Dockerspawner

License

Notifications You must be signed in to change notification settings

rajat404/europa

Repository files navigation

Europa

Notes for setting up JupyterHub on localhost/server with custom authentication, and using Dockerspawner to provide each user with a separate container.

Things Covered

  • Setup JupyterHub
  • Add Custom Authentication
  • Provide a pre-built test notebook (read-only) to each user
  • Provide a separate Docker container to each user
  • Integrate Docker Swarm

Setup

Server Provisioning

To run JupyterHub locally, you can use Vagrant. Simply running vagrant up --provision shall setup the base box, and provision it. After which you can move to installing Docker.

To setup on a server, run provision.sh. After that install docker.

Install Docker

Docker Documentation for Installation

Prepare Docker Image

After that, you can either:

  • Pull the docker image for jupyter via: docker pull jupyterhub/singleuser:latest
  • Clone the Dockerspawner repo & modify their Dockerfile & support scripts

We've taken Dockerspawner's Dockerfile and updated it to include the a sample notebook inside the container. This notebook shall be a read-only notebook, and shall be accessible to every user in their respective container. Similarly, files can be added

Running Jupyterhub

Navigate to the project directory as root user, and start Jupyterhub by running:

jupyterhub -f PROJECT_PATH/jupyterhub_config.py

Credits

Sincere thanks to all the contributors of Project Jupyter & JupyterHub, and all the people who documented their use cases & deployment notes for JupyerHub

Resources

About

Notes for setting up JupyterHub with custom authentication, and using Dockerspawner

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published