Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/tools/pi-drive-27b/run-spark-27b.sh # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / tools / pi-drive-27b / run-spark-27b.sh` 66 lines ยท 2259 bytes Raw Blame History 1 #!/bin/bash 2 # Launch Qwen3.8-27B-FP8 on DGX Spark GB10 with maximum unified memory dedicated 3 # to the model (full 262,144-token native context), bound to WireGuard 100.64.0.2:18099 4 # so the Raspberry Pi (hub, AArch64) drives it remotely with zero agent/compiler bloat on Spark. 5 # 6 # Follows Spark rules: 7 # - Never touches MODEL_PORT (18091) or motor-revival.service (Harness Lock) 8 # - Runs inside an authorized spark-window with an EXIT trap (RULE-spark-no-idle-models.md) 9 # - Posts CLAIM / RELEASE to ~/handoffs/BOARD.md 10 set -euo pipefail 11 12 BIN_DIR="$HOME/.local/state/aien-q36/bin-`cc45f45e`" 13 MODEL_DIR="$HOME/models/specialist-transfer/qwen3.8-27b-fp8-`017b9c7a`" 14 BIND_ADDR="${PI_DRIVE_BIND:-127.0.0.1}" 15 PORT="${PI_DRIVE_PORT:-18099}" 16 MAX_CTX="${PI_DRIVE_MAX_CTX:-131072}" 17 MAX_TOK="${PI_DRIVE_MAX_TOK:-16384}" 18 LEASE_MIN="${PI_DRIVE_LEASE:-10}" 19 LOG_FILE="/tmp/pi-drive-27b-spark.log" 20 BOARD="$HOME/handoffs/BOARD.md" 21 SERVER_PID="" 22 23 cleanup() { 24 local rc=$? 25 if [ -n "$SERVER_PID" ] && kill -0 "$SERVER_PID" 2>/dev/null; then 26 kill "$SERVER_PID" 2>/dev/null || true 27 for _ in $(seq 1 20); do 28 kill -0 "$SERVER_PID" 2>/dev/null || break 29 sleep 0.5 30 done 31 kill -9 "$SERVER_PID" 2>/dev/null || true 32 fi 33 echo "$(date -u +%FT%H:%MZ) RELEASE pi-drive-27b to all: Qwen3.8-27B-FP8 max-ctx=${MAX_CTX} server stopped cleanly on ${BIND_ADDR}:${PORT}" >> "$BOARD" 34 exit "$rc" 35 } 36 trap cleanup EXIT INT TERM 37 38 cd "$BIN_DIR" 39 sha256sum -c SHA256SUMS >/dev/null 40 41 echo "$(date -u +%FT%H:%MZ) CLAIM pi-drive-27b to all: Qwen3.8-27B-FP8 on GB10 (max-ctx=${MAX_CTX}, ${BIND_ADDR}:${PORT}) driven from Pi hub over SSH tunnel, lease ${LEASE_MIN}m" >> "$BOARD" 42 43 ./aien-serve-http \ 44 --engine omega \ 45 --model-dir "$MODEL_DIR" \ 46 --bind "$BIND_ADDR" \ 47 --port "$PORT" \ 48 --max-context "$MAX_CTX" \ 49 --max-tokens-cap "$MAX_TOK" \ 50 --thinking off > "$LOG_FILE" 2>&1 & 51 SERVER_PID=$! 52 53 for _ in $(seq 1 180); do 54 if ! kill -0 "$SERVER_PID" 2>/dev/null; then 55 echo "ERROR: aien-serve-http exited early:" >&2 56 tail -n 40 "$LOG_FILE" >&2 57 exit 1 58 fi 59 if curl -fsS "http://${BIND_ADDR}:${PORT}/health" >/dev/null 2>&1; then 60 echo "READY pid=${SERVER_PID} bind=${BIND_ADDR}:${PORT} max_ctx=${MAX_CTX}" 61 break 62 fi 63 sleep 1 64 done 65 66 wait "$SERVER_PID"