motif64

m64_5bb90e178223 / start.sh

43 lines, 2.0 KBraw
1#!/usr/bin/env bash2# dsh-qwen38nvfp4-gb10 entrypoint. Runs inside the container; takes no arguments.3#   127.0.0.1:9000     vllm serve qwen38-27b-nvfp4 (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.8-27B NVFP4"}' >> "$M64_STATUS"14vllm serve /weights/model --host 127.0.0.1 --port 9000 \15    --served-model-name qwen38-27b-nvfp4 \16    --quantization modelopt \17    --kv-cache-dtype fp8 \18    --max-model-len 262144 \19    --gpu-memory-utilization 0.85 \20    --max-num-seqs 4 \21    --enforce-eager \22    --enable-auto-tool-choice \23    --tool-call-parser qwen3_coder \24    --reasoning-parser qwen3 \25    --enable-prefix-caching &26VLLM_PID=$!2728export AGENT_HARNESS=dsh29export AGENT_HARNESS_TITLE="DeepSeek Harness 0.2.0-rc.2 (deepseek-ai/deepseek-harness)"30export AGENT_MODEL=qwen38-27b-nvfp4 UPSTREAM_MODEL=qwen38-27b-nvfp431export AGENT_CONTEXT=262144 AGENT_VISION=132export LLM_BASE_URL=http://127.0.0.1:9000/v133export RELAY_URL=http://127.0.0.1:9000        # the gateway's health check: vLLM's /health34export NODE_USE_ENV_PROXY=1                   # web access, if granted, goes through the m64 gate35python3 -u /capsule/cli_shim.py &36SHIM_PID=$!3738alive() { [ -r "/proc/$1/stat" ] && [ "$(cut -d')' -f2 "/proc/$1/stat" | cut -d' ' -f2)" != Z ]; }39( while alive "$VLLM_PID" && alive "$SHIM_PID"; do sleep 5; done40  echo '{"phase":"error","detail":"vLLM or the dsh shim exited"}' >> "$M64_STATUS"41  kill -TERM $$ ) &4243exec python3 /capsule/agent_gateway.py