Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,36 @@ base:
let attempts=$attempts+1 ;
done

base:noargs:
extends: .build
stage: base
needs:
- version
script:
- attempts=0
- nocache=""
- while !
docker buildx build ${BUILD_OPTIONS} ${nocache}
--cache-from type=registry,ref=${CI_REGISTRY}/${CI_PROJECT_PATH}/buildcache:base-noargs-${CI_COMMIT_REF_SLUG}-amd64
--cache-from type=registry,ref=${GH_REGISTRY}/${GH_REGISTRY_USER}/buildcache:base-noargs-${CI_COMMIT_REF_SLUG}-amd64
--cache-from type=registry,ref=${CI_REGISTRY}/${CI_PROJECT_PATH}/buildcache:base-noargs-${CI_DEFAULT_BRANCH_SLUG}-amd64
--cache-from type=registry,ref=${GH_REGISTRY}/${GH_REGISTRY_USER}/buildcache:base-noargs-${CI_DEFAULT_BRANCH_SLUG}-amd64
--cache-to type=registry,ref=${CI_REGISTRY}/${CI_PROJECT_PATH}/buildcache:base-noargs-${CI_COMMIT_REF_SLUG}-amd64,mode=max
--file containers/debian/Dockerfile
containers/debian
2>&1 | tee build.log
; do
if grep "unknown blob" build.log ; then
nocache="--no-cache" ;
else
exit 1 ;
fi ;
if test ${attempts} -ge 1 ; then
echo "Failed to build on second attempt!" ;
exit 1 ;
fi ;
let attempts=$attempts+1 ;
done

eic:
parallel:
Expand Down Expand Up @@ -496,6 +526,39 @@ eic:
let attempts=$attempts+1 ;
done

eic:noargs:
extends: .build
stage: eic
needs:
- version
- base
script:
- attempts=0
- nocache=""
- while !
docker buildx build ${BUILD_OPTIONS} ${nocache}
--cache-from type=registry,ref=${CI_REGISTRY}/${CI_PROJECT_PATH}/buildcache:eic-noargs-${CI_COMMIT_REF_SLUG}-amd64
--cache-from type=registry,ref=${GH_REGISTRY}/${GH_REGISTRY_USER}/buildcache:eic-noargs--${CI_COMMIT_REF_SLUG}-amd64
--cache-from type=registry,ref=${CI_REGISTRY}/${CI_PROJECT_PATH}/buildcache:eic-noargs--${CI_DEFAULT_BRANCH_SLUG}-amd64
--cache-from type=registry,ref=${GH_REGISTRY}/${GH_REGISTRY_USER}/buildcache:eic-noargs--${CI_DEFAULT_BRANCH_SLUG}-amd64
--cache-to type=registry,ref=${CI_REGISTRY}/${CI_PROJECT_PATH}/buildcache:eic-noargs--${CI_COMMIT_REF_SLUG}-amd64,mode=max
--build-context spack-environment=spack-environment
--file containers/eic/Dockerfile
containers/eic
2>&1 | tee build.log
; do
if grep "unknown blob" build.log ; then
nocache="--no-cache" ;
else
exit 1 ;
fi ;
if test ${attempts} -ge 1 ; then
echo "Failed to build on second attempt!" ;
exit 1 ;
fi ;
let attempts=$attempts+1 ;
done

user_spack_environment:
stage: benchmarks
needs:
Expand Down
3 changes: 2 additions & 1 deletion containers/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ target=${target[${TARGETPLATFORM}]}
spack config --scope site add "packages:all:require:[target=${target}]"
spack config --scope site add "packages:all:target:[${target}]"
spack config blame packages
mkdir -p $HOME/.spack/
spack config --scope user add "config:suppress_gpg_warnings:true"
spack config --scope user add "config:build_jobs:${jobs}"
spack config --scope user add "config:db_lock_timeout:${jobs}00"
Expand Down Expand Up @@ -278,4 +279,4 @@ set -e
git clone --filter=tree:0 https://github.com/${EICSPACK_ORGREPO}.git ${EICSPACK_ROOT}
git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION}
spack repo add --scope site "${EICSPACK_ROOT}"
EOF
EOF
10 changes: 10 additions & 0 deletions containers/debian/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ To build the container in this directory:
```
docker buildx build -f Dockerfile .
```

**Note:** The minimal build command shown above will assume default values for all build arguments. For this container, that means 'develop' versions for all spack repositories:
- `SPACK_VERSION=develop`
- `SPACKPACKAGES_VERSION=develop`
- `KEY4HEPSPACK_VERSION=main`
- `EICSPACK_VERSION=develop`

**Important:** Docker layer caching will not automatically update the previous checkout of these 'develop' versions. To ensure you have the latest commits, you may need to use `--no-cache` or rebuild without cache.

For specific operations as used in CI builds (including custom build arguments and cache management), please refer to the GitHub and GitLab CI workflows in this repository.
4 changes: 4 additions & 0 deletions containers/eic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ ARG TARGETPLATFORM
LABEL org.opencontainers.image.title="Electron-Ion Collider build concretization image (default configuration, $TARGETPLATFORM)"

## Copy our default environment
## Note that a named build context is *required* for this build:
## e.g. --build-context spack-environment=../../spack-environment
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=xl
ENV SPACK_ENV=/opt/spack-environment/${ENV}
Expand Down Expand Up @@ -114,6 +116,8 @@ ARG TARGETPLATFORM
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime concretization image (default configuration, $TARGETPLATFORM)"

## Copy our default environment
## Note that a named build context is *required* for this build:
## e.g. --build-context spack-environment=../../spack-environment
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=xl
ENV SPACK_ENV=/opt/spack-environment/${ENV}
Expand Down
13 changes: 13 additions & 0 deletions containers/eic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@ To build the container in this directory:
```
docker buildx build -f Dockerfile --build-context spack-environment=../../spack-environment .
```

**Note:** The minimal build command shown above will assume default values for all build arguments. For this container, that means 'develop' versions for all spack repositories:
- `BUILDER_IMAGE=debian_stable_base`
- `RUNTIME_IMAGE=debian_stable_base`
- `ENV=xl`
- `BENCHMARK_COM_VERSION=master`
- `BENCHMARK_DET_VERSION=master`
- `BENCHMARK_REC_VERSION=master`
- `BENCHMARK_PHY_VERSION=master`

**Important:** Docker layer caching will not automatically update the previous checkout of these 'master' versions. To ensure you have the latest commits, you may need to use `--no-cache` or rebuild without cache.

For specific operations as used in CI builds (including custom build arguments and cache management), please refer to the GitHub and GitLab CI workflows in this repository.
Loading