#!/usr/bin/env bash # Rebuild Super Beam page data from the in-weights replay and republish the Space. # Run hourly by the superbeam-refresh systemd user timer; stops the timer once the # superbeam-inweights job has finished and a final publish is done. set -euo pipefail cd "$(dirname "$0")/.." .venv/bin/python scripts/build_superbeam_page_data.py .venv/bin/python scripts/build_token_trace.py OMP_NUM_THREADS=1 .venv/bin/modal run scripts/publish_space.py if ! systemctl --user is-active --quiet superbeam-inweights; then systemctl --user stop superbeam-refresh.timer || true fi