Skip to content

Maintaining Spack Buildcache

Matthew Thompson edited this page Dec 3, 2024 · 3 revisions

This page details the efforts to create a buildcache for use in Spack CI tests in MAPL.

Useful Links

Building Packages on AWS

Preliminaries

Padded Length

Testing showed we apparently need to increase the length of the padding in the install tree. This is what I ran:

spack config add config:install_tree:padded_length:512

Building Packages

We want all the dependencies of MAPL, so we need to do:

spack install --only dependencies mapl

This (should) get us everything that MAPL needs to build.

Building the Buildcache

Create Spack Environment

It turns out, you can't build or push a buildcache unless you are in a Spack environment. So we need to create one:

spack env create mapl-buildcache
spack env activate -p mapl-buildcache

Add Packages to Environment

spack add esmf
spack add gftl gftl-shared fargparse pflogger pfunit yafyaml
spack add ecbuild udunits
spack concretize -f

Add mirror for buildcache

spack mirror add --oci-username mathomp4 --oci-password-variable <GITHUB TOKEN SEE 1PASSWORD> --unsigned mapl-buildcache oci://ghcr.io/mathomp4/mapl-buildcache

Pushing the Buildcache

spack buildcache push --update-index oci://ghcr.io/mathomp4/mapl-buildcache
Clone this wiki locally