motif64

m64_32fb139687ac / start.sh

41 lines, 1.8 KBraw
1#!/usr/bin/env bash2# openclaw-qwen38-gb10 entrypoint. Runs inside the container; takes no arguments.3#   127.0.0.1:9000     vllm serve qwen38-27b (gx10 agents/sandbox.sh profile: util 0.85, ctx 262144)4#   127.0.0.1:4096     cli_shim.py: `openclaw agent --local` 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"}' >> "$M64_STATUS"14vllm serve /weights/model --host 127.0.0.1 --port 9000 \15    --served-model-name qwen38-27b \16    --max-model-len 262144 \17    --gpu-memory-utilization 0.85 \18    --max-num-seqs 4 \19    --enforce-eager \20    --enable-auto-tool-choice \21    --tool-call-parser qwen3_coder \22    --reasoning-parser qwen3 \23    --enable-prefix-caching &24VLLM_PID=$!2526export AGENT_HARNESS=openclaw27export AGENT_HARNESS_TITLE="OpenClaw 2026.9.2"28export AGENT_MODEL=qwen38-27b UPSTREAM_MODEL=qwen38-27b29export AGENT_CONTEXT=262144 AGENT_VISION=130export LLM_BASE_URL=http://127.0.0.1:9000/v131export RELAY_URL=http://127.0.0.1:9000        # the gateway's health check: vLLM's /health32export NODE_USE_ENV_PROXY=1                   # web access, if granted, goes through the m64 gate33python3 -u /capsule/cli_shim.py &34SHIM_PID=$!3536alive() { [ -r "/proc/$1/stat" ] && [ "$(cut -d')' -f2 "/proc/$1/stat" | cut -d' ' -f2)" != Z ]; }37( while alive "$VLLM_PID" && alive "$SHIM_PID"; do sleep 5; done38  echo '{"phase":"error","detail":"vLLM or the openclaw shim exited"}' >> "$M64_STATUS"39  kill -TERM $$ ) &4041exec python3 /capsule/agent_gateway.py