nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

Separate out XIOS Docker build #626

Closed jwallwork23 closed 3 months ago

jwallwork23 commented 4 months ago

Separate out XIOS Docker build

Fixes #625

Task List


Change Description

Currently, we have a Dockerfile.devenv and a Dockerfile.production, which depends on it. The former sets up the build dependencies using Spack, as well as installing XIOS. This is inconvenient for updating XIOS because rebuilding the dev-env image requires rebuilding the Spack environment, too.

This PR separates out Dockerfile.devenv into two steps: Dockerfile.base, which installs the dependencies, and Dockerfile.devenv, which pulls in those and installs XIOS.

I've built the images locally, as well as Dockerfile.production, which is built on top of Dockerfile.devenv. Running the production Docker image built with mpi=ON and xios=ON, I was able to run the tests successfully. Once the reviewer is happy with the changes, I can push the Docker images to ghcr.


Pre-Request Checklist

jwallwork23 commented 3 months ago

We discussed this in the meeting and I realised it's not such a big deal. I usually run Docker builds with the --no-cache option but this can be avoided in most cases.