motif64

m64_129e3b16765e / start.sh

45 lines, 2.0 KBraw
1#!/usr/bin/env bash2# dsh-qwen36-gb10 entrypoint. Runs inside the container; takes no arguments.3#   127.0.0.1:9000     vllm serve qwen36-35b (gx10 agents/sandbox.sh profile: util 0.85, ctx 262144)4#   127.0.0.1:4096     cli_shim.py: `dsh --profile headless --json` once per prompt5#   0.0.0.0:$M64_PORT  agent_gateway.py: the agent.session API6set -eu78export HOME=/scratch/home WORK_DIR=/scratch/work SHIM_HOMES=/scratch/homes9mkdir -p "$HOME" "$WORK_DIR/sessions" "$SHIM_HOMES" /scratch/cache10export HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 VLLM_NO_USAGE_STATS=1 DO_NOT_TRACK=111export XDG_CACHE_HOME=/scratch/cache VLLM_CACHE_ROOT=/scratch/cache/vllm TRITON_CACHE_DIR=/scratch/cache/triton1213echo '{"phase":"loading","detail":"vLLM: loading Qwen3.6-35B-A3B NVFP4"}' >> "$M64_STATUS"14vllm serve /weights/model --host 127.0.0.1 --port 9000 \15    --served-model-name qwen36-35b \16    --quantization compressed-tensors \17    --moe-backend marlin \18    --kv-cache-dtype fp8 \19    --max-model-len 262144 \20    --gpu-memory-utilization 0.85 \21    --max-num-seqs 4 \22    --max-num-batched-tokens 4096 \23    --enforce-eager \24    --enable-auto-tool-choice \25    --tool-call-parser qwen3_coder \26    --reasoning-parser qwen3 \27    --enable-prefix-caching &28VLLM_PID=$!2930export AGENT_HARNESS=dsh31export AGENT_HARNESS_TITLE="DeepSeek Harness 0.2.0-rc.2 (deepseek-ai/deepseek-harness)"32export AGENT_MODEL=qwen36-35b UPSTREAM_MODEL=qwen36-35b33export AGENT_CONTEXT=262144 AGENT_VISION=134export LLM_BASE_URL=http://127.0.0.1:9000/v135export RELAY_URL=http://127.0.0.1:9000        # the gateway's health check: vLLM's /health36export NODE_USE_ENV_PROXY=1                   # web access, if granted, goes through the m64 gate37python3 -u /capsule/cli_shim.py &38SHIM_PID=$!3940alive() { [ -r "/proc/$1/stat" ] && [ "$(cut -d')' -f2 "/proc/$1/stat" | cut -d' ' -f2)" != Z ]; }41( while alive "$VLLM_PID" && alive "$SHIM_PID"; do sleep 5; done42  echo '{"phase":"error","detail":"vLLM or the dsh shim exited"}' >> "$M64_STATUS"43  kill -TERM $$ ) &4445exec python3 /capsule/agent_gateway.py