#!/usr/bin/env bash # autoresearch.sh — canonical frank-archon benchmark entry point (dev box). # # The service runs on dankserver (192.168.0.235:7770), the two R9700s live # there, and the benchmark must own those cards, so the whole stop -> boot # scratch -> bench -> restore sequence runs ON dankserver (see # scripts/autoresearch-frank-archon.sh). This wrapper: # 1. copies the candidate config (the repo's scripts/frank-archon.env, the # file the autoresearch loop edits) and the bench script to dankserver, # 2. runs the bench over ssh, relaying its stdout (the METRIC lines) and # exit code back here verbatim. # It deliberately does NOT push to origin: the scp dirties dankserver's # working tree, and the loop's uncommitted candidate config must not be # pushed. Only this file and scripts/autoresearch-frank-archon.sh are # committed; the candidate env rides over ssh each run. set -uo pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REMOTE=dankserver REMOTE_REPO=/home/dank/serverAppConfigs scp -q "$DIR/scripts/frank-archon.env" \ "$REMOTE:$REMOTE_REPO/scripts/frank-archon.env" || { echo "scp env failed" >&2; exit 1; } scp -q "$DIR/scripts/autoresearch-frank-archon.sh" \ "$REMOTE:$REMOTE_REPO/scripts/autoresearch-frank-archon.sh" || { echo "scp script failed" >&2; exit 1; } ssh "$REMOTE" "bash $REMOTE_REPO/scripts/autoresearch-frank-archon.sh $REMOTE_REPO/scripts/frank-archon.env"