#!/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_Q14=$(cat "$LOGDIR/prompt-qwen14b.txt") PROMPT_DS=$(cat "$LOGDIR/prompt-deepseek.txt") echo "==== $(date -Is) QWEN14 start ====" | tee -a "$LOGDIR/master.log" ollama-gpu stop hermes3:8b 2>/dev/null || true ollama-gpu stop qwen2.5-coder:7b 2>/dev/null || true ollama-gpu stop deepseek-coder:6.7b 2>/dev/null || true "$HOME/agent-coder" --qwen14 -s openkknd-qwen14b "$PROMPT_Q14" \ >"$LOGDIR/qwen14b.out" 2>"$LOGDIR/qwen14b.err" echo "qwen14 exit=$?" | tee -a "$LOGDIR/master.log" tail -50 "$LOGDIR/qwen14b.out" | tee -a "$LOGDIR/master.log" (cd "$HOME/src/openkknd-qwen14b" && ./build.sh) >"$LOGDIR/qwen14b-build.txt" 2>&1 || true ls -la "$HOME/src/openkknd-qwen14b" | tee -a "$LOGDIR/master.log" echo "==== $(date -Is) DEEPSEEK 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 ollama-gpu stop hermes3:8b 2>/dev/null || true "$HOME/agent-coder" --deepseek -s openkknd-deepseek "$PROMPT_DS" \ >"$LOGDIR/deepseek.out" 2>"$LOGDIR/deepseek.err" echo "deepseek exit=$?" | tee -a "$LOGDIR/master.log" tail -50 "$LOGDIR/deepseek.out" | tee -a "$LOGDIR/master.log" (cd "$HOME/src/openkknd-deepseek" && ./build.sh) >"$LOGDIR/deepseek-build.txt" 2>&1 || true ls -la "$HOME/src/openkknd-deepseek" | tee -a "$LOGDIR/master.log" echo "==== $(date -Is) DONE ====" | tee -a "$LOGDIR/master.log" # summary for d in openkknd-qwen14b openkknd-deepseek; do echo "-- $d --" | tee -a "$LOGDIR/master.log" test -x "$HOME/src/$d/openkknd" && echo binary=yes || echo binary=no test -f "$HOME/src/$d/README.md" && echo README=yes || echo README=no test -d "$HOME/src/$d/.git" && echo git=yes || echo git=no done | tee -a "$LOGDIR/master.log"