diff options
author | Stephen Sachs <stesachs@amazon.com> | 2023-05-24 15:55:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 06:55:00 -0700 |
commit | 2d77e44f6f57dcd1529c1ce712acfc6a60f47206 (patch) | |
tree | 9242d604bf51d539195891fddd8c2d6ad101ec63 /share | |
parent | 033599c4cd0889af2cb8ae4b52984fa88558f5c2 (diff) | |
download | spack-2d77e44f6f57dcd1529c1ce712acfc6a60f47206.tar.gz spack-2d77e44f6f57dcd1529c1ce712acfc6a60f47206.tar.bz2 spack-2d77e44f6f57dcd1529c1ce712acfc6a60f47206.tar.xz spack-2d77e44f6f57dcd1529c1ce712acfc6a60f47206.zip |
Pcluster local buildcache (#37852)
* [pcluster pipeline] Use local buildcache instead of upstream spack
Spack currently does not relocate compiler references from upstream spack
installations. When using a buildcache we don't need an upstream spack.
* gcc needs to be installed via postinstall to get correct deps
* quantum-espresso@gcc@12.3.0 returns ICE on neoverse_{n,v}1
* Force gitlab to pull the new container
* Revert "Force gitlab to pull the new container"
This reverts commit 3af5f4cd88245138992deb2a46c17e6f85858d68.
Seems the gitlab version does not yet support "pull_policy" in .gitlab-ci.yml
* Gitlab keeps picking up wrong container. Renaming
* Update containers once more after failed build
Diffstat (limited to 'share')
5 files changed, 23 insertions, 38 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index cc82f74dd7..3415a5f20d 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -788,20 +788,17 @@ deprecated-ci-build: ######################################## .aws-pcluster-generate-image: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] } .aws-pcluster-generate: before_script: - # Setup postinstall Spack as upstream installation + # Use gcc from local container buildcache - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh - - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/modules.xyaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi - - if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi + - spack mirror add local-cache /bootstrap/local-cache + - spack gpg trust /bootstrap/public-key - cd "${CI_PROJECT_DIR}" && curl -sOL https://raw.githubusercontent.com/spack/spack-configs/main/AWS/parallelcluster/postinstall.sh - - sed -i -e '/nohup/s/&$//' -e 's/nohup//' -e "s/spack arch -t/echo ${SPACK_TARGET_ARCH}/g" postinstall.sh + - sed -i -e "s/spack arch -t/echo ${SPACK_TARGET_ARCH}/g" postinstall.sh - /bin/bash postinstall.sh -fg - spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\"" after_script: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml index 6a068b6b87..dc08ddde0a 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml @@ -35,18 +35,15 @@ spack: ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] } before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh - spack --version - spack arch - # Setup postinstall Spack as upstream installation - - - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi - - if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi + # Use gcc from local container buildcache + - - spack mirror add local-cache /bootstrap/local-cache + - spack gpg trust /bootstrap/public-key - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg - spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\"" - signing-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml index 0f8aea1984..0dc063af14 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml @@ -16,7 +16,7 @@ spack: - openfoam - palace # - py-devito - - quantum-espresso + # - quantum-espresso # - wrf - optimized_libs: @@ -36,19 +36,16 @@ spack: ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] } tags: ["aarch64"] before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh - spack --version - spack arch - # Setup postinstall Spack as upstream installation - - - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi - - if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi + # Use gcc from local container buildcache + - - spack mirror add local-cache /bootstrap/local-cache + - spack gpg trust /bootstrap/public-key - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg - spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\"" - signing-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml index ad80b258dd..7629f6242f 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml @@ -16,7 +16,7 @@ spack: - openfoam - palace # - py-devito - - quantum-espresso + # - quantum-espresso # - wrf - optimized_libs: @@ -36,19 +36,16 @@ spack: ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] } tags: ["aarch64"] before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh - spack --version - spack arch - # Setup postinstall Spack as upstream installation - - - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi - - if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi + # Use gcc from local container buildcache + - - spack mirror add local-cache /bootstrap/local-cache + - spack gpg trust /bootstrap/public-key - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg - spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\"" - signing-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml index 7ae5f338f7..ecec12eda1 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml @@ -35,18 +35,15 @@ spack: ci: pipeline-gen: - build-job: - image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:latest", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/pcluster-amazonlinux-2:v2023-05-25", "entrypoint": [""] } before_script: - - . "./share/spack/setup-env.sh" - . /etc/profile.d/modules.sh - spack --version - spack arch - # Setup postinstall Spack as upstream installation - - - if [[ -f /bootstrap/spack/etc/spack/packages.yaml ]]; then cp /bootstrap/spack/etc/spack/packages.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/config.yaml ]]; then cp /bootstrap/spack/etc/spack/config.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/modules.yaml ]]; then cp /bootstrap/spack/etc/spack/modules.yaml ./etc/spack/; fi - - if [[ -f /bootstrap/spack/etc/spack/mirrors.yaml ]]; then cp /bootstrap/spack/etc/spack/mirrors.yaml ./etc/spack/; fi - - if [[ -d /bootstrap/spack/opt/spack ]]; then spack config add "upstreams:postinstall:install_tree:/bootstrap/spack/opt/spack"; fi + # Use gcc from local container buildcache + - - spack mirror add local-cache /bootstrap/local-cache + - spack gpg trust /bootstrap/public-key - - /bin/bash "${SPACK_ARTIFACTS_ROOT}/postinstall.sh" -fg - spack config --scope site add "packages:all:target:\"target=${SPACK_TARGET_ARCH}\"" - signing-job: |