brown-ccv / jupyterhub-docker-images

GNU General Public License v3.0
0 stars 1 forks source link

Docker Images for Brown's JupyterHub


For Users

Docker Images

See a list of the Docker images here.

To use one of those images locally:

# example
docker run -it --rm -p 8888:8888 pkg.dev/jupyterhub-docker-images/mpa2065:latest

Environment Files

We provide Conda and Julia environemnt files if you wish to recreate the JupyterHub environment locally. These files are available for download from this Google Storage Bucket.

For Developers

Overview

This document outlines the process for creation of Docker images for JupyterHub at Brown. Every semester multiple courses request a JupyterHub, we build one image for each of those courses based on requirements specified in the request. We use Github Actions and Docker Compose to create the environments, build, and push the docker images.

The GH Actions way

To create an image to be used in JupyterHub for a particular class, we need these components:

Shared components

Class-specific components

Each class has the following exclusive components:

Note: The production image will be created in CI.

To add a new class:

# e.g
cd dev/
./add_class.sh -c data1010 -t r_julia -s fall -p 3.7 -q

To build the images locally:

You will need to authenticate on GCLoud with our Service account. To do so, download a new key for the service account as a JSON file (if you haven't done so before). Authenticate your local gcloud with the service account

gcloud auth activate-service-account --key-file=<path-to-json-key>

Then, configure pkg.dev for docker and the zone of your registry, e.g.,

gcloud auth configure-docker us-east1-docker.pkg.dev

You could test push a local image as follows (mpa2065 example)

docker tag mpa2065:latest us-east1-docker.pkg.dev/jupyterhub-docker-images/all-classes/mpa2065:test-local
docker push us-east1-docker.pkg.dev/jupyterhub-docker-images/all-classes/mpa2065:test-local