Skip to content

ooicloud/pangeo-stacks

 
 

Repository files navigation

Pangeo Stacks

Currated Docker images for use with Jupyter and Pangeo

Action Status

This repository contains a few currated Docker images that can be used with deployments of the Pangeo Helm Chart. Each of the images in this repository are configured and built using repo2docker and are continuously deployed to DockerHub. Importantly, each image built in this repo includes the minimum required libraries to do scalable computations with Pangeo (via dask-kubernetes).

Current Notebook Images:

Image Description Link Badges
base-notebook A bare-bones image with Jupyter and Dask. DockerHub
pangeo-notebook A complete image with lots of Python packages DockerHub
pangeo-esip An image customized for ESIP use DockerHub

Customize images with the -onbuild variants

You can customize the images here in comon ways by using the image variants that have the -onbuild suffix. If your Dockerfile inherits from an -onbuild Pangeo image, you automatically get the following features:

  1. The contents of your directory are copied with appropriate permissions into the image. The files will be present under the directory pointed to by ${REPO_DIR} docker environment variable.

  2. If you have any of the following files in your repository, they are used to automatically customize the image similar to what repo2docker (used by mybinder.org) does:

    a. requirements.txt installs python packages with pip b. environment.yml installs conda packages c. apt.txt lists ubuntu packages to be installed d. postBuild is a script (in any language) that is run automatically after other customization steps for you to execute arbitrary code.

    These files could also be inside a binder/ directory rather than the top level of your repository if you would like.

For example, if you want to start from the base pangeo-notebook image but add the django python package, you would do the following.

  1. Create a Dockerfile in your repo with just the following content:

    FROM pangeo/pangeo-notebook-onbuild:<version>
    
  2. Add a requirements.txt file with the following contents

    django
    

And that's it! Now you can build the image any way you wish (on a binder instance, with repo2docker, or just with docker build), and it'll do the customizations for you automatically.

Adding new images

It is easy to add additional images. The basic steps involved are:

  1. Open an Issue to discuss adding your image.
  2. Copy the base-notebook directory and name it something informative.
  3. Modify the contents of the binder directory, adding any configuration you need according to the repo2docker documentation.
  4. Edit the TravisCI configuration file to inclue the new image.
  5. Push your changes to GitHub and open a Pull Request.

CI/CD

The images in Pangeo-stacks are built and deployed continuously using TravisCI. Images are versioned using the CALVER system.

Build locally

The images here can be built locally using repo2docker. The following example demonstrates how to build the base-notebook image:

repo2docker --no-run --user-name=jovyan --user-id 1000 \
    --image-name=pangeo/base-notebook ./base-notebook

Related projects

  • Jupyter/docker-stacks: Ready-to-run Docker images containing Jupyter applications
  • repo2docker: A tool to build, run, and push Docker images from source code repositories that run via a Jupyter server
  • Pangeo Helm Chart: The helm chart for installing Pangeo.

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.8%
  • Shell 10.2%
  • Dockerfile 6.0%