diff options
Diffstat (limited to '.devcontainer')
-rwxr-xr-x | .devcontainer/postCreateCommand.sh | 20 | ||||
-rw-r--r-- | .devcontainer/ubuntu20.04/devcontainer.json | 5 | ||||
-rw-r--r-- | .devcontainer/ubuntu22.04/devcontainer.json | 5 |
3 files changed, 30 insertions, 0 deletions
diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 0000000000..e319719a37 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Load spack environment at terminal startup +cat <<EOF >> /root/.bashrc +. /workspaces/spack/share/spack/setup-env.sh +EOF + +# Load spack environment in this script +. /workspaces/spack/share/spack/setup-env.sh + +# Ensure generic targets for maximum matching with buildcaches +spack config --scope site add "packages:all:require:[target=x86_64_v3]" +spack config --scope site add "concretizer:targets:granularity:generic" + +# Find compiler and install gcc-runtime +spack compiler find --scope site + +# Setup buildcaches +spack mirror add --scope site develop https://binaries.spack.io/develop +spack buildcache keys --install --trust diff --git a/.devcontainer/ubuntu20.04/devcontainer.json b/.devcontainer/ubuntu20.04/devcontainer.json new file mode 100644 index 0000000000..325e6e57fd --- /dev/null +++ b/.devcontainer/ubuntu20.04/devcontainer.json @@ -0,0 +1,5 @@ +{ + "name": "Ubuntu 20.04", + "image": "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01", + "postCreateCommand": "./.devcontainer/postCreateCommand.sh" +} diff --git a/.devcontainer/ubuntu22.04/devcontainer.json b/.devcontainer/ubuntu22.04/devcontainer.json new file mode 100644 index 0000000000..c4b5d24302 --- /dev/null +++ b/.devcontainer/ubuntu22.04/devcontainer.json @@ -0,0 +1,5 @@ +{ + "name": "Ubuntu 22.04", + "image": "ghcr.io/spack/ubuntu-22.04:v2024-05-07", + "postCreateCommand": "./.devcontainer/postCreateCommand.sh" +} |