Skip to content

fadeoutsoftware/CIMA---JupyterHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupyter Hub - docker Spawner for Continuum trainings

This project has as main objective the creation of a Jupiter Hub instance to allows users to launch Jupyterlabs with an already setup environment. The technology used to create such instances in the Jupyter context is the so called Spawner , and in particular the Docker spawner.

This approach allows to serve to each user a ready environment for the trainings and, by installing it on a powerful machine, supports more users during the training, simplifying the computational resource management.

Project organization

The project has 2 main artifacts and relative directories:

  • HubImage

This folder contains the assets required to create and configure the Jupyterhub configuration.

  • LabImage

This folder contains the assets required to create the base image to be used for user's environmet creation. The Dockerfile contains the steps used to build Continuum for the training, in order to recreate the same seup for each user.

Config & Setup

To make the HUB reachable an IP (or host) must be assigned to it. In the example we laveraged on a docker network created for the tests by using the following command:

docker network create --subnet=10.0.0.0/16 jupyter-hub-net

This can be done by editing the file in [PROJECT_ROOT/HubImage/jupyterhub_config.py]

Crucial point in config

c.JupyterHub.hub_ip = '10.0.1.4'

c.JupyterHub.hub_port = 54321

Build & Run

Execute [PROJECT_ROOT/LabImage/build.sh] to create and tag the continuum user image.

Execute [PROJECT_ROOT/HubImage/build.sh] to create the Hub image.

Execute [PROJECT_ROOT/HubImage/run.sh] to launch the project.

Connect then to localhost:8000 to launch a docjer instance of the Lab. Note: the credentials are temporary and should handled in the final environment.

Users management policy

  • Reference for Users management policy can be found here
  • The current setup generates a new administrator user setup on c.Authenticator.admin_users = {'admin'} section of the jupyter hub config.
  • At first startup of the the Hub server aministrator MUST register with the selected username, choosing a password. This user will be automatically authorized and will be the administrator of the Hub.
  • New users can now register and only the administration. by accessing the autorization panel, can enable their accont.
  • The authorization management panel can be found at [BASE_URL]/hub/authorize
  • Note that this panel is not reachable by clicking on any part of the Hub interface: please use the Url specified above.

Project resources management

  • The current setup mount a commmon volume for input data in read only and an output directory for each user. The reference directory is from a local environment used during development (on my machine NDR :) ) Please swap with the final directory on the server: a rebuild is required to appply new setup.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors