-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
spack stack create ctr
: make specs configurable, remove warn…
…ings, add CI builds (#805) * Update submodule pointer for spack * Update configs/containers: all container recipes, extra specs directory with different sets of specs, updated README.md * Remove invalid/unnecessary settings from container yamls * CI tests for building containers * Update documentation for building containers
- Loading branch information
Showing
9 changed files
with
110 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: ubuntu-ci-container-x86_64-build | ||
on: | ||
pull_request: | ||
# pull request to develop with label | ||
branches: [develop] | ||
types: [labeled] | ||
schedule: | ||
- cron: '0 8 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
container: | ||
description: 'Container template (input requred, no default value).' | ||
required: true | ||
specs: | ||
description: 'Which specs to add to the template (input requred, no default value).' | ||
required: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
#shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
ubuntu-ci-container-x86_64-build: | ||
# For PRs only if label matches, and for workflow_dispatch and schedule events | ||
if: ${{ github.event.label.name == 'container-ci' }} || ${{ github.event_name == 'workflow_dispatch' }} || ${{ github.event_name == 'schedule' }} | ||
runs-on: [ubuntu-ci-x86_64] | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
# Ensure that ubuntu can run docker | ||
- name: ubuntu-docker | ||
run: | | ||
echo "Checking if user ubuntu can run docker" | ||
if id -nG ubuntu | grep -qw docker; then | ||
echo "User ubuntu already belongs to group docker" | ||
else | ||
echo "Adding user ubuntu to group docker" | ||
sudo gpasswd -a ubuntu docker | ||
newgrp docker | ||
docker run hello-world | ||
fi | ||
- name: create-ctr | ||
run: | | ||
source ./setup.sh | ||
# Get day of week to set default container for scheduled builds | ||
DOW=$(date +%u) | ||
# Monday is 1 ... Sunday is 7 | ||
if [[ $DOW == 1 || $DOW == 4 ]]; then | ||
export CONTAINER=${{ inputs.container || 'docker-ubuntu-clang-mpich' }} | ||
export SPECS=${{ inputs.specs || 'jedi-ci' }} | ||
elif [[ $DOW == 2 || $DOW == 5 ]]; then | ||
export CONTAINER=${{ inputs.container || 'docker-ubuntu-gcc-openmpi' }} | ||
export SPECS=${{ inputs.specs || 'jedi-ci' }} | ||
elif [[ $DOW == 3 || $DOW == 6 ]]; then | ||
export CONTAINER=${{ inputs.container || 'docker-ubuntu-intel-impi' }} | ||
export SPECS=${{ inputs.specs || 'jedi-ci' }} | ||
else | ||
# Day 7: The Sabbath of rest | ||
echo "Pruning all docker images" | ||
docker system prune -a | ||
exit 0 | ||
fi | ||
export ENVDIR=$PWD/envs/${CONTAINER} | ||
spack stack create ctr --container ${CONTAINER} --specs ${SPECS} | ||
cd ${ENVDIR} | ||
# mapl doesn't build with mpich - https://github.com/JCSDA/spack-stack/issues/608 | ||
if [[ '${CONTAINER}' == 'docker-ubuntu-clang-mpich' ]]; then | ||
sed -i 's/- mapl@2.35.2/#- mapl@2.35.2/g' spack.yaml | ||
fi | ||
spack containerize > Dockerfile | ||
docker build -t ${SPECS}-${SPECS} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
### spack-stack-1.5.0 / skylab-6.0.0 containers for fv3-jedi and mpas-jedi (but not for ufs-jedi) | ||
specs: [base-env@1.0.0, jedi-base-env@1.0.0 ~fftw, ewok-env@1.0.0, jedi-fv3-env@1.0.0, | ||
jedi-mpas-env@1.0.0, bacio@2.4.1, bison@3.8.2, bufr@12.0.0, ecbuild@3.7.2, eccodes@2.27.0, ecflow@5, | ||
eckit@1.24.4, ecmwf-atlas@0.34.0 +trans ~fftw, fiat@1.2.0, ectrans@1.2.0 ~fftw, eigen@3.4.0, | ||
fckit@0.11.0, fms@release-jcsda, g2@3.4.5, g2tmpl@1.10.0, gftl-shared@1.5.0, | ||
gsibec@1.1.3, hdf@4.2.15, hdf5@1.14.0, ip@4.3.0, jasper@2.0.32, jedi-cmake@1.4.0, | ||
libpng@1.6.37, nccmp@1.9.0.1, netcdf-c@4.9.2, netcdf-cxx4@4.3.1, | ||
netcdf-fortran@4.6.0, nlohmann-json@3.10.5, nlohmann-json-schema-validator@2.1.0, | ||
parallelio@2.5.10, parallel-netcdf@1.12.2, py-eccodes@1.4.2, py-f90nml@1.4.3, | ||
py-gitpython@3.1.27, py-h5py@3.7.0, py-numpy@1.22.3, | ||
py-pandas@1.5.3, py-pip, py-pyyaml@5.4.1, py-scipy@1.9.3, py-shapely@1.8.0, py-xarray@2022.3.0, | ||
sp@2.3.3, udunits@2.2.28, w3nco@2.4.1, w3emc@2.10.0, nco@5.0.6, esmf@8.4.2, mapl@2.35.2, | ||
yafyaml@0.5.1, zlib@1.2.13, zstd@1.5.2, odc@1.4.6, shumlib@macos_clang_linux_intel_port, | ||
awscli@1.27.84, py-globus-cli@3.16.0] | ||
# Notes: | ||
# 1. Remove mapl@2.35.2 from clang/mpich container, because mapl doesn't work with mpich@4 | ||
# 2. Don't build CRTM by default so that it gets built in the JEDI bundles | ||
# 3. Comment out for now until build problems are solved | ||
# https://github.com/jcsda/spack-stack/issues/522 | ||
# py-mysql-connector-python@8.0.32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters