From 819680d42837bc4c667ff99d014e1301774c2ccf Mon Sep 17 00:00:00 2001 From: wu-kan Date: Wed, 20 Nov 2024 18:16:34 +0800 Subject: [PATCH] fix --- Dockerfile | 3 ++- share/sysu-scc-spack-repo/init-env.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19053ca..6bdbe5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,8 @@ rm -rf /var/lib/apt/lists/* $(dirname $SCC_SETUP_ENV)/init-env.sh ${SCC_SPACK_TAG} cp -r $(dirname $SCC_SETUP_ENV)/../../lib $(dirname $SCC_SETUP_ENV)/../../../spack . $(dirname $SCC_SETUP_ENV)/../../../spack/share/spack/setup-env.sh -spack config --scope=site add "packages:all:target:["${SCC_TARGET}"]" +# Ensure generic targets for maximum matching with buildcaches +spack config --scope site add "packages:all:require:["${SCC_TARGET}"]" $(dirname $SCC_SETUP_ENV)/init-default-compiler.sh "builtin.gcc@12.3.0 target=x86_64_v3 os=ubuntu22.04" "gcc@12.3.0%gcc@12.3.0+binutils" "gcc@12.3.0" spack env create sccenv $(dirname $SCC_SETUP_ENV)/../../spack.yaml spack env activate -p sccenv diff --git a/share/sysu-scc-spack-repo/init-env.sh b/share/sysu-scc-spack-repo/init-env.sh index ce7a836..37995fa 100755 --- a/share/sysu-scc-spack-repo/init-env.sh +++ b/share/sysu-scc-spack-repo/init-env.sh @@ -3,7 +3,7 @@ python3 -c "from tarfile import open;from urllib.request import urlopen;open(mod mv $(dirname $SCC_SETUP_ENV)/../../../spack-$1/spack-* $(dirname $SCC_SETUP_ENV)/../../../spack rm -rf $(dirname $SCC_SETUP_ENV)/../../../spack-$1 . $(dirname $SCC_SETUP_ENV)/../../../spack/share/spack/setup-env.sh +spack config --scope site add "concretizer:targets:granularity:generic" spack mirror add --scope=site $1 https://binaries.spack.io/$1 -spack mirror add --scope=site E4S https://cache.e4s.io spack buildcache keys --install --trust spack repo add --scope=site $(dirname $SCC_SETUP_ENV)/../..