Skip to content

sci-ndp/jhub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NDP JupyterHub Docker

Core Documentation

Setup

  1. Install Docker
  2. Copy .env.example as .env file:
cp .env.example .env

And add missing Keycloak secret JUPYTERHUB_KEYCLOAK_CLIENT_SECRET= !!! CHANGE ME !!!

Deploy:

docker compose -f docker-compose.yaml up --build -d Go to http://localhost:8002/hub/spawn to use JupyterHub.

Undeploy:

docker compose -f docker-compose.yaml down

Important Notes

  1. The hub is customized using these guides: https://jupyterhub.readthedocs.io/en/stable/howto/templates.html#extending-templates https://github.com/jupyterhub/jupyterhub/tree/886ce6cbdfc00b66b45ac769e5ab2270abca3ef1/share/jupyterhub/templates hub_docker_image folder contains Dockerfile for hub image + templates and pics.

  2. jupyterhub_config.py is the main JupyterHub configuration, it is mounted in docker compose file (docker-compose.dev.yaml).

  3. All needed customization changes and logic can be done in jupyterhub_config.py. Mainly, they will be applied to classes:

  4. There are few other Jupyter dependencies in the following GIT repos:

  1. A number of environment variables has to be set in .env file, passed to docker-compose.yaml file and processed in jupyterhub_config.py in order the overall deployment to work.
  2. All NDP docker images and Python packages(PyPi) are stored in NRP Gitlab (https://gitlab.nrp-nautilus.io/).
  • Gitlab Container Registry (for Docker images). Enter your Gitlab username and personal access token: docker login gitlab-registry.nrp-nautilus.io Now, you should be able to push images to our Gitlab registry. For example:
docker push gitlab-registry.nrp-nautilus.io/ndp/ndp-docker-images/jh:2.0.10

Our images are located at: https://gitlab.nrp-nautilus.io/ndp/ndp-docker-images/container_registry

Create file: ~/.pypirc

[distutils]
index-servers =
    gitlab

[gitlab]
repository = https://gitlab.nrp-nautilus.io/api/v4/projects/ndp%2Fndp-docker-images/packages/pypi
username = <your_personal_access_token_name>
password = <your_personal_access_token>

After that, you'll be able to push PyPi packages, so they can be installed later by standard pip command:

pip install jupyterlab-git ndp-jupyterlab-extension --index-url https://gitlab.nrp-nautilus.io/api/v4/projects/3930/packages/pypi/simple

Our packages are located at: https://gitlab.nrp-nautilus.io/ndp/ndp-docker-images/-/packages

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors