Files
localgenai/pyinfra/framework/compose/kimi-linear/build.sh
noisedestroyers a29793032d Document current coding-workflow stack state
Snapshot of where opencode + Qwen3-Coder + MCPs + Kimi-Linear + voice
  + Phoenix tracing land today, plus in-flight (oc-tree, kimi-linear
  context ramp) and next (ComfyUI) items with pointers to per-project
  NEXT_STEPS.md guides.
2026-05-10 21:14:43 -04:00

52 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# Source-build a vLLM 0.11.2-pinned image from kyuz0's gfx1151 toolbox.
# Use only when the upstream `kyuz0/vllm-therock-gfx1151:stable` tag
# crashes on Kimi-Linear with a v0.12-class error
# (`MLAModules.__init__() missing 'indexer_rotary_emb'`).
#
# Compiles flash-attention, AITER+CK, vLLM, and bitsandbytes from source
# with MAX_JOBS=4 (fixed upstream). Expect a multi-hour wall-clock on
# Strix Halo. Idempotent — skips if the target tag already exists.
#
# Pin policy. KYUZ0_COMMIT is the upstream SHA whose CI build produced
# the published `:stable` on 2026-04-22; bump only after re-validating
# Kimi-Linear works with the new toolbox revision. VLLM_COMMIT is the
# Moonshot recipe pin for Kimi-Linear; do not bump to v0.12.x.
set -euo pipefail
KYUZ0_REPO="https://github.com/kyuz0/amd-strix-halo-vllm-toolboxes.git"
KYUZ0_COMMIT="e2288d6"
VLLM_COMMIT="v0.11.2"
IMAGE_TAG="kimi-linear-local:${VLLM_COMMIT}"
WORKDIR="/tmp/kimi-linear-build"
if docker image inspect "$IMAGE_TAG" >/dev/null 2>&1; then
echo "[build] $IMAGE_TAG already exists. To rebuild: docker rmi $IMAGE_TAG"
exit 0
fi
if [ ! -d "$WORKDIR/.git" ]; then
rm -rf "$WORKDIR"
git clone "$KYUZ0_REPO" "$WORKDIR"
fi
cd "$WORKDIR"
git fetch origin
git checkout --quiet "$KYUZ0_COMMIT"
echo "[build] kyuz0 toolbox @ $(git rev-parse --short HEAD)"
echo "[build] vLLM pin: $VLLM_COMMIT"
echo "[build] image tag: $IMAGE_TAG"
echo "[build] expected wall-clock: hours. Use tmux."
echo
docker build \
--build-arg "VLLM_COMMIT=${VLLM_COMMIT}" \
-t "$IMAGE_TAG" \
-f Dockerfile \
.
echo
echo "[build] done. Switch image: in docker-compose.yml to $IMAGE_TAG."