cp2k/tools/docker/spack_cache_start.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
645 B
Bash
Raw Permalink Normal View History

2025-05-08 11:20:35 +02:00
#!/bin/bash -e
# author: Ole Schuett
if podman start spack-cache; then
2025-05-08 11:20:35 +02:00
echo "Re-started existing spack cache."
else
# Start MinIO server.
podman run --name spack-cache --detach -p 9000:9000 -p 9001:9001 \
2025-05-08 11:20:35 +02:00
quay.io/minio/minio server /data --console-address ":9001"
sleep 3
podman container logs spack-cache
2025-05-08 11:20:35 +02:00
# Configure localhost.
podman exec spack-cache mc alias set local http://localhost:9000 minioadmin minioadmin
2025-05-08 11:20:35 +02:00
# Create bucket.
podman exec spack-cache mc mb local/spack-cache
2025-05-08 11:20:35 +02:00
# Make bucket public.
podman exec spack-cache mc anonymous set public local/spack-cache
2025-05-08 11:20:35 +02:00
echo "Started new spack cache."
fi
#EOF