spack-tutorial
spack-tutorial copied to clipboard
Spack installation fails when using recommended tutorial Docker image
I'm new to spack, and when I try to follow the tutorial, the installation fails when I use the recommended Docker container. The documentation recommends running the container like so:
docker pull ghcr.io/spack/tutorial:sc23
docker run -it ghcr.io/spack/tutorial:sc23
I'm on an Apple Silicon Mac, so I've got to specify a working platform:
docker pull --platform=linux/amd64 ghcr.io/spack/tutorial:sc23
docker run -it --platform=linux/amd64 ghcr.io/spack/tutorial:sc23
From there, after cloning the spack repo into the container with git clone --depth=100 --branch=releases/v0.21.0 https://github.com/spack/spack.git ~/spack
the setup-env.sh
script fails to run:
$ . spack/share/spack/setup-env.sh
==> Error: SPACK_ROOT must point to spack's prefix when using qemu-x_
Run this with the correct prefix before sourcing setup-env.sh:
export SPACK_ROOT=</path/to/spack>
This message only appears once; future runs of the setup-env.sh
script produce no output. I've found that the message persists even when I set the SPACK_ROOT
environment variable to either /home/spack/spack/bin/spack
or /home/spack/spack/bin
I've been able to set up spack on EC2 instances outside of a container environment, but I'd like to run through the tutorial and experimenting with the tool locally in a container, as recommended.