Spack docker tester: Restore cache setup and access via host endpoint (#5236)

This commit is contained in:
SY Wang 2026-05-18 22:41:25 +08:00 committed by GitHub
parent fac8184df2
commit ea7c263a32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 46 additions and 57 deletions

View file

@ -3,13 +3,12 @@
# author: Ole Schuett
if [[ -n "${SPACK_CACHE}" ]]; then
if [[ "${SPACK_CACHE}" == *"http://spack-cache:9000"* ]]; then
if ! wget -q --tries=1 "http://spack-cache:9000/spack-cache"; then
if [[ "${SPACK_CACHE}" == *"http://host.containers.internal:9000"* ]]; then
if ! wget -q --tries=1 "http://host.containers.internal:9000/spack-cache"; then
echo ""
echo "ERROR: Could not connect to local Spack cache."
echo " Start the cache by running ./spack_cache_start.sh and then pass --network=cp2k-spack-cache-net to podman."
echo " Start the cache by running ./spack_cache_start.sh."
echo " Alternatively, disable the cache by passing --build-arg SPACK_CACHE=\"\" to podman."
echo " See also: https://manual.cp2k.org/trunk/getting-started/build-with-spack.html"
echo ""
exit 1
fi