OpenKKnD/kknd2-runs/20260713-093232/run.sh
2026-09-17 21:48:48 +02:00

37 lines
1.6 KiB
Bash
Executable file

#!/usr/bin/env bash
set -uo pipefail
export PATH="$HOME/.local/bin:/usr/bin:$PATH"
export OLLAMA_API_KEY=ollama-local
export OLLAMA_HOST=127.0.0.1
export OPENCLAW_TIMEOUT=1200
LOGDIR="${1:?}"
PROMPT_QWEN=$(cat "$LOGDIR/prompt-qwen.txt")
PROMPT_HERMES=$(cat "$LOGDIR/prompt-hermes.txt")
echo "==== $(date -Is) QWEN start ====" | tee -a "$LOGDIR/master.log"
# free VRAM for 14b
ollama-gpu stop hermes3:8b 2>/dev/null || true
ollama-gpu stop qwen2.5-coder:7b 2>/dev/null || true
"$HOME/agent-coder" --qwen14 -s openkknd-qwen "$PROMPT_QWEN" \
>"$LOGDIR/qwen.out" 2>"$LOGDIR/qwen.err"
echo "qwen exit=$?" | tee -a "$LOGDIR/master.log"
tail -40 "$LOGDIR/qwen.out" | tee -a "$LOGDIR/master.log"
# build proof
(cd "$HOME/src/openkknd-qwen" && ./build.sh) >"$LOGDIR/qwen-build.txt" 2>&1 || true
echo "==== qwen tree ====" | tee -a "$LOGDIR/master.log"
ls -la "$HOME/src/openkknd-qwen" | tee -a "$LOGDIR/master.log"
echo "==== $(date -Is) HERMES start ====" | tee -a "$LOGDIR/master.log"
ollama-gpu stop qwen2.5-coder:14b 2>/dev/null || true
ollama-gpu stop qwen2.5-coder:7b 2>/dev/null || true
"$HOME/agent-coder" --hermes -s openkknd-hermes "$PROMPT_HERMES" \
>"$LOGDIR/hermes.out" 2>"$LOGDIR/hermes.err"
echo "hermes exit=$?" | tee -a "$LOGDIR/master.log"
tail -40 "$LOGDIR/hermes.out" | tee -a "$LOGDIR/master.log"
(cd "$HOME/src/openkknd-hermes" && ./build.sh) >"$LOGDIR/hermes-build.txt" 2>&1 || true
echo "==== hermes tree ====" | tee -a "$LOGDIR/master.log"
ls -la "$HOME/src/openkknd-hermes" | tee -a "$LOGDIR/master.log"
echo "==== $(date -Is) DONE ====" | tee -a "$LOGDIR/master.log"