#!/usr/bin/env bash # Install the claude/hugepages measurement inputs on rnr5090 (run on the server from the directory that holds the scripts and the uploaded binaries): # bash hugepages-install.sh # Freezes (read-only) /data/leleka-e2e/hugepages/{tools,bin-hugepages,rt-hugepages} and writes MANIFEST.sha256 over every input a run depends on (tools, binaries, the shared # harness run-e2e.sh / long-session.py, the upstream profile, the corpus manifest, the identity capture tools). The jobs refuse to start on a missing or changed input. set -euo pipefail HP=/data/leleka-e2e/hugepages D=/data/leleka-e2e/decode/dt SRC=$(cd "$(dirname "$0")" && pwd) BIN=${1:?directory with the uploaded binaries, or --tools-only} mkdir -p "$HP/tools" "$HP/bin-hugepages" chmod -R u+w "$HP/tools" "$HP/bin-hugepages" 2>/dev/null || true chmod u+w "$HP/rt-hugepages" 2>/dev/null || true for f in hugepages-ab.sh hugepages-id.sh hugepages-analyze.py baseline-sampler.py ts-wrap.sh; do install -m 0444 "$SRC/$f" "$HP/tools/$f"; done if [ "$BIN" != --tools-only ]; then # --tools-only: refresh the tools and the manifest, keep the installed binaries for b in leleka-inference leleka-daemon leleka-cli strata-next; do install -m 0555 "$BIN/$b" "$HP/bin-hugepages/$b"; done install -m 0444 "$BIN/COMMIT.txt" "$HP/bin-hugepages/COMMIT.txt" install -m 0555 "$BIN/rt-hugepages" "$HP/rt-hugepages" fi chmod a-w "$HP/tools" "$HP/bin-hugepages" { sha256sum "$HP"/tools/* "$HP"/bin-hugepages/* "$HP/rt-hugepages" \ "$D/tools/long-session.py" "$D/scripts/e2e/run-e2e.sh" "$D/scripts/e2e/sample_env.sh" "$D/tools/q_pair.py" "$D/tools/q_tail_gate.py" \ /data/leleka-e2e/decode/assets/expert-profile-upstream.bin /data/leleka-e2e/decode/corpus/MANIFEST.txt } >"$HP/MANIFEST.sha256.new" mv "$HP/MANIFEST.sha256.new" "$HP/MANIFEST.sha256" echo "installed; $(wc -l <"$HP/MANIFEST.sha256") inputs in $HP/MANIFEST.sha256"