llama.cpp runtime arm: serve-script runtime switch, harness containerless support, master build
This commit is contained in:
+12
-8
@@ -24,7 +24,7 @@ restore() {
|
||||
echo "[harness] tearing down candidate, restoring deployed baseline..." >&2
|
||||
ssh "$HOST" 'sudo -n systemctl stop frank-large.service 2>/dev/null;
|
||||
podman rm -f frank-large-mimo 2>/dev/null;
|
||||
true' >/dev/null 2>&1 || true
|
||||
pkill -x llama-server 2>/dev/null; true' >/dev/null 2>&1 || true
|
||||
ssh "$HOST" 'sudo -n systemctl start frank-large.service' >/dev/null 2>&1 || true
|
||||
exit $rc
|
||||
}
|
||||
@@ -40,14 +40,13 @@ rsync -a "$REPO/scripts/frank-large.env" "$REPO/scripts/serve-frank-large.sh" \
|
||||
ssh "$HOST" 'sudo -n systemctl stop frank-large.service;
|
||||
podman rm -f frank-large-mimo 2>/dev/null; true' >/dev/null
|
||||
|
||||
# 3. Boot the candidate detached. The serve script's own gates run first;
|
||||
# a gate failure exits here with the reason.
|
||||
# 3. Boot the candidate detached; the launcher's own output IS the serve
|
||||
# stage output (gate failures print there before any container exists).
|
||||
echo "[harness] starting candidate..." >&2
|
||||
if ! ssh "$HOST" "setsid nohup env FRANK_LARGE_ENV_FILE=$RDIR/frank-large.env \
|
||||
ssh "$HOST" "setsid nohup env FRANK_LARGE_ENV_FILE=$RDIR/frank-large.env \
|
||||
bash $RDIR/serve-frank-large.sh >$RDIR/serve.log 2>&1 </dev/null & echo ok" \
|
||||
| grep -q ok; then
|
||||
echo "ERROR: could not launch candidate" >&2; exit 1
|
||||
fi
|
||||
| tee /tmp/autoresearch-launch.log >&2
|
||||
grep -q ok /tmp/autoresearch-launch.log || { echo "ERROR: launch failed" >&2; exit 1; }
|
||||
|
||||
# 4. Wait for health (503 while loading; anything else = boot failure).
|
||||
echo "[harness] waiting for health..." >&2
|
||||
@@ -55,10 +54,15 @@ if ! ssh "$HOST" "for i in \$(seq 1 $HEALTH_TRIES); do
|
||||
code=\$(curl -s -o /dev/null -w '%{http_code}' --max-time 3 \
|
||||
http://127.0.0.1:7770/health 2>/dev/null || echo 000)
|
||||
[ \"\$code\" = 200 ] && echo UP && exit 0
|
||||
st=\$(podman inspect -f '{{.State.Status}}' frank-large-mimo 2>/dev/null || echo gone)
|
||||
if [ \"\$st\" = exited ] || { [ \"\$st\" = gone ] && ! pgrep -f serve-frank-large >/dev/null; }; then echo DOWN; exit 1; fi
|
||||
sleep 5
|
||||
done; exit 1" | grep -q UP; then
|
||||
echo "ERROR: candidate never became healthy; serve.log tail:" >&2
|
||||
ssh "$HOST" "tail -30 $RDIR/serve.log" >&2 || true
|
||||
ssh "$HOST" "tail -30 $RDIR/serve.log; echo '--- engine log ---';
|
||||
podman logs --tail 120 frank-large-mimo 2>&1 |
|
||||
grep -aiE 'error|raise|failed|traceback|assert|kernel' |
|
||||
tail -30" >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user