m64_8b1157d27168 / start.sh
44 lines, 2.2 KBraw
1#!/usr/bin/env bash2# openclaw-inkling2mini-gb10 entrypoint. Runs inside the container; takes no arguments.3# 127.0.0.1:9000 vllm serve inkling-2-mini (the inkling-2-mini-gb10 capsule's flags: vLLM's DGX Spark recipe, 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 Inkling 2 Mini"}' >> "$M64_STATUS"14vllm serve /weights/model --host 127.0.0.1 --port 9000 \15 --served-model-name inkling-2-mini \16 --tensor-parallel-size 1 \17 --max-model-len 262144 \18 --gpu-memory-utilization 0.85 \19 --max-num-seqs 4 \20 --reasoning-parser inkling \21 --enable-auto-tool-choice \22 --tool-call-parser inkling \23 --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"probabilistic"}' \24 --enable-prefix-caching &25VLLM_PID=$!2627export AGENT_HARNESS=openclaw28export AGENT_HARNESS_TITLE="OpenClaw 2026.9.2"29export AGENT_MODEL=inkling-2-mini UPSTREAM_MODEL=inkling-2-mini30export AGENT_CONTEXT=262144 AGENT_VISION=131# The airbench checkup harness's settings at this window (see cli_shim.py): 32768 out, and pi compacts with a 65536-token reserve.32export AGENT_MAX_OUT=32768 AGENT_COMPACTION_RESERVE=6553633export LLM_BASE_URL=http://127.0.0.1:9000/v134export RELAY_URL=http://127.0.0.1:9000 # the gateway's health check: vLLM's /health35export NODE_USE_ENV_PROXY=1 # web access, if granted, goes through the m64 gate36python3 -u /capsule/cli_shim.py &37SHIM_PID=$!3839alive() { [ -r "/proc/$1/stat" ] && [ "$(cut -d')' -f2 "/proc/$1/stat" | cut -d' ' -f2)" != Z ]; }40( while alive "$VLLM_PID" && alive "$SHIM_PID"; do sleep 5; done41 echo '{"phase":"error","detail":"vLLM or the openclaw shim exited"}' >> "$M64_STATUS"42 kill -TERM $$ ) &4344exec python3 /capsule/agent_gateway.py