This repo contains the Docker images for the Fornax Platform deployments. It produces the jupyterhub computing environments.
The following is a general description of the images:
-
Each image is in its own directory (e.g.
fornax-baseandfornax-main). -
jupyter-baseis a custom jupyterlab image that matches the base-notebook in the jupyter stack. -
fornax-baseis a base image for other images in fornax. Other images should use it as a starting point. -
Jupyterlab is installed in an environment called
jupyterin $ENV_DIR/jupyter. Basic astronomy and analysis packages are installed in a environment calledpython3, which is the default environment for running analysis. -
Each demo notebook has its own environment. These environments are created during the build using the
requirements.txtfiles associated with individual notebooks (managed withuv). Notebook environment have names:py-{notebook-name}. -
overrides.jsoncontains any jupyter settings that need to be set by default. -
The
scripts/build.pyscript is used when building the images. The script has many options. Runpython scripts/build.py -hfor detailed help. Example runs include:- To build an image locally:
python scripts/build.py image-name. Whereimage-nameisfornax-base,fornax-mainetc. The image will be tagged asghcr.io/nasa-fornax/fornax-images/{image-name}:{branch-name} - Adding
--pushpushes the images the the github container registry. - Adding
--ecr-endpoint $ENDPOINT --trigger-ecrnotify$ENDPOINTthat a new image has been built. This is used as part of the build CI.
- To build an image locally:
-
Building an image that starts from
fornx-basewill trigger theONBUILDsections defined infornax-base/Dockerfile, which include:- If
build-*files exist, the scripts are run during the build. - If
conda-{env}.ymlexists, it is used to create a conda environment called{env}. - If
requirements-{env}.txtexists, it is used to create a virtual python environment{env}(usinguv venv). Experience showed that having packages managed withpiprather thanconda, reduces the chance of conflicts. Conda-managed environments can create the undesired situations (e.g. #20) where conda install a version of a package and pip install another one. - The
introduction.mdfile is shared between the main fornax images. During the build, its copied to the image folder and converted to an html file (withpandoc) that is included in the image.
- If
-
jupyter-base: is a custom jupyterlab image that matches the base-notebook in the jupyter stack. It is build here to allow for customization, including the possibility of using conda alternatives, such as pixi (in the future). -
fornax-base: is the base image that all other fornax images start from. It contains jupyter and the basic science tools needed for deployment in the fornax project. -
fornax-main: Main Fornax image that was used for the demo notebooks. It contains several notebook kernels. Thenotebookenvironment contains general astronomy and science tools. Additionally, each demo notebook has its own environment (or kernel). -
fornax-hea: Fornax image containign high energy software. For now, it has heasoft as installed as a conda package.