From e05565e223013a48508c19cca680a636a8086919 Mon Sep 17 00:00:00 2001 From: Laurent Zuijdwijk Date: Sat, 3 Oct 2026 08:00:40 +0100 Subject: [PATCH] gyro_setup.sh: set up the venv first and build with its cmake/ninja (distro cmake can be < 3.24) Ported from agentionai/Strata rc2 9a89f63 (rc2 = 9ff02c9), author Laurent Zuijdwijk. --- tools/gyro_setup.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/gyro_setup.sh b/tools/gyro_setup.sh index 11a3d910..2d3899e9 100755 --- a/tools/gyro_setup.sh +++ b/tools/gyro_setup.sh @@ -14,7 +14,12 @@ while [ $# -gt 0 ]; do case "$1" in case "$MODEL" in S) F=Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf; P=gyro-s;; M) F=Qwen3.8-Flash-Next-Gyro-M-TQ2_0.gguf; P=gyro-m;; *) echo "--model must be S or M"; exit 2;; esac step() { printf '\n== %s\n' "$*"; } -for t in git cmake ninja python3; do command -v $t >/dev/null || { echo "missing: $t"; exit 1; }; done +for t in git python3; do command -v $t >/dev/null || { echo "missing: $t"; exit 1; }; done + +step "python environment (also provides cmake >= 3.24 and ninja)" +[ -x .venv/bin/python ] || python3 -m venv .venv +.venv/bin/pip install -q -r requirements.txt huggingface_hub hf_transfer +export PATH="$PWD/.venv/bin:$PATH" step "agentionai llama.cpp fork (GGML with the trellis types) -> $LLAMA" [ -d "$LLAMA/ggml" ] || git clone --depth 1 https://github.com/agentionai/llama.cpp "$LLAMA" @@ -34,10 +39,6 @@ elif [ "$BACKEND" = hip ]; then else echo "--backend must be cuda or hip"; exit 2; fi cmake --build build -j -step "python environment" -[ -x .venv/bin/python ] || python3 -m venv .venv -.venv/bin/pip install -q -r requirements.txt huggingface_hub hf_transfer - step "download $F -> $MODELS (keep it on a fast local SSD: the n-gram table is read per token)" mkdir -p "$MODELS" if [ -s "$MODELS/$F" ]; then echo "already there: $MODELS/$F (delete it to download again)"