#!/usr/bin/env bash # qwen38-flash-next-strata-gb10 entrypoint. Runs inside the container; takes no arguments. # `strata launch` prepares the model (its 1.5 GB pack, made from shard 1 at every start) and serves it on # 127.0.0.1:8080; proxy.py puts it on $M64_PORT. The GGUF shards are mounted read-only under /weights; # nothing is fetched at runtime. On a GB10 setup picks the settings Strata measured on the DGX Spark itself # (experts read in place from the model file, --mmap-experts; 32K prompt chunks; 4-bit draft layer). set -eu QUANT=${QUANT:-IQ3_S} CONTEXT=${CONTEXT:-65536} VISION=${VISION:-on} export M64_MODEL_NAME=${M64_MODEL_NAME:-qwen3.8-flash-next-iq3_s-strata} status() { printf '{"phase":"%s","detail":"%s"}\n' "$1" "$2" >> "$M64_STATUS"; } status loading "preparing the model folder" # Strata's state, settings, install folder and data all live in this run's /scratch. export HOME=/scratch/home XDG_STATE_HOME=/scratch/state XDG_CONFIG_HOME=/scratch/config export STRATA_INSTALL_DIR=/scratch/install D=/scratch/Strata-data M=/scratch/model mkdir -p "$HOME" "$XDG_STATE_HOME" "$XDG_CONFIG_HOME" "$STRATA_INSTALL_DIR/third_party" "$D" "$M" ln -sfn /opt/strata/seed/third_party/llama.cpp "$STRATA_INSTALL_DIR/third_party/llama.cpp" # The draft layer made in the image; setup rewrites its vocabulary subset, so it gets a writable copy (0.8 GB). cp -r /opt/strata/mtp "$D/mtp" # The shards and the picture reader, under the names setup knows. m64 checked them against their Hugging Face # SHA-256 (the ones setup.py pins), so they get finish marks and are not hashed again at every start. for f in /weights/qwen38fn/"$QUANT"/*.gguf /weights/qwen38fn/mmproj-Qwen3.8-Flash-Next-BF16.gguf; do ln -sf "$f" "$M/"; printf 'm64 verified\n' > "$M/$(basename "$f").done" done status loading "preparing the $QUANT pack and starting the engine (a few minutes)" # --access local: Strata listens on 127.0.0.1 only and needs no key; proxy.py is the way in. /opt/strata/terminal/bin/strata launch --no-tui --yes \ --family qwen --model "$QUANT" --model-path "$M" --data-dir "$D" \ --context "$CONTEXT" --vision "$VISION" --parallel "${PARALLEL:-1}" --tune skip \ --access local --port 8080 --save-preset m64 exec /opt/strata/terminal/python/bin/python3 -u /capsule/proxy.py