diff --git a/config.yaml b/config.yaml index ab4cb09c..79bdaacc 100644 --- a/config.yaml +++ b/config.yaml @@ -492,6 +492,20 @@ uenvs: daint: [gh200] santis: [gh200] clariden: [gh200] + srt: + "26.4": + recipes: + zen2: "26.4" + zen3: "26.4" + gh200: "26.4" + a100: "26.4" + deploy: + daint: [gh200] + santis: [gh200] + clariden: [gh200] + eiger: [zen2] + bristen: [a100] + mount: "/user-tools" vasp: "v6.4.2": recipes: diff --git a/recipes/srt/26.4/compilers.yaml b/recipes/srt/26.4/compilers.yaml new file mode 100644 index 00000000..65120c9f --- /dev/null +++ b/recipes/srt/26.4/compilers.yaml @@ -0,0 +1,2 @@ +gcc: + version: "14" diff --git a/recipes/srt/26.4/config.yaml b/recipes/srt/26.4/config.yaml new file mode 100644 index 00000000..0a34ffaa --- /dev/null +++ b/recipes/srt/26.4/config.yaml @@ -0,0 +1,10 @@ +name: srt +spack: + repo: https://github.com/spack/spack.git + commit: releases/v1.1 + packages: + repo: https://github.com/spack/spack-packages.git + commit: 1a32c3379c9fa28549c68b7931712d81831304df # 2025-12-16 +store: /user-tools +description: Anthropic Sandbox Runtime (srt) and its Linux runtime dependencies (bubblewrap, socat, ripgrep, node-js) +version: 2 diff --git a/recipes/srt/26.4/environments.yaml b/recipes/srt/26.4/environments.yaml new file mode 100644 index 00000000..9c87fa9f --- /dev/null +++ b/recipes/srt/26.4/environments.yaml @@ -0,0 +1,17 @@ +srt: + compiler: [gcc] + unify: true + specs: + - python@3.12 # Node.js uses gyp for its build system, which is notoriously sensitive to Python versions. + - node-js + - npm # Add this as a standalone spec as it is not automatically included with node-js + - bubblewrap + - socat + - ripgrep + views: + srt: + link: roots + uenv: + prefix_paths: + PATH: [bin] + LD_LIBRARY_PATH: [lib, lib64] diff --git a/recipes/srt/26.4/modules.yaml b/recipes/srt/26.4/modules.yaml new file mode 100644 index 00000000..8fc2550e --- /dev/null +++ b/recipes/srt/26.4/modules.yaml @@ -0,0 +1,20 @@ +modules: + # Paths to check when creating modules for all module sets + prefix_inspections: + bin: + - PATH + lib: + - LD_LIBRARY_PATH + lib64: + - LD_LIBRARY_PATH + + default: + arch_folder: false + tcl: + all: + autoload: none + hash_length: 0 + exclude_implicits: true + exclude: [] + projections: + all: '{name}/{version}' diff --git a/recipes/srt/26.4/post-install b/recipes/srt/26.4/post-install new file mode 100755 index 00000000..2f7b33dd --- /dev/null +++ b/recipes/srt/26.4/post-install @@ -0,0 +1,18 @@ +#!/bin/bash + +# Description: Install @anthropic-ai/sandbox-runtime via npm into the srt spack view directory, so the srt binary is co-located with node/npm/ripgrep. + +# UENV specific environment variables +export ENV_MOUNT={{ env.mount }} # export ENV_MOUNT=/user-environment + +# Find the node-js and npm prefixes installed by Spack +NODE_HOME=$(spack -C $ENV_MOUNT/config location -i node-js) +NPM_HOME=$(spack -C $ENV_MOUNT/config location -i npm) + +# Add node and npm to the active PATH for this execution context +export PATH="${NODE_HOME}/bin:${NPM_HOME}/bin:${PATH}" + +# Install @anthropic-ai/sandbox-runtime globally with --prefix set to the srt spack view directory ($ENV_MOUNT/env/srt). +# This places the srt binary at $ENV_MOUNT/env/srt/bin/srt, alongside the spack-linked node, npm, ripgrep, bwrap and socat binaries in that view's bin/. +npm install --global --prefix $ENV_MOUNT/env/srt @anthropic-ai/sandbox-runtime +