Files
vllm-omni/probe/issue-2/serve.sh
T

29 lines
1.1 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
# Issue 2 probe: serve Qwen-Image-2.1 on the RTX 3090 with one labeled
# flag set. VRAM is polled once per second for the whole server lifetime,
# matching issue 1's instrument (nvidia-smi csv series).
#
# Usage: serve.sh LABEL [extra vllm flags...]
set -uo pipefail
BASE=$HOME/Projects/vllm-omni-val
W=$BASE/issue2
LABEL=$1; shift
RUN=$W/runs/$LABEL
mkdir -p "$RUN"
SNAP=$HOME/.local/state/multi-model-helper-server/state/image-service/weights/hub/models--Qwen--Qwen-Image-2.1/snapshots/790c92633540aa0cb11d9abf19eb46d861714758
export HF_HOME=$HOME/.local/state/multi-model-helper-server/state/image-service/weights
export HF_HUB_OFFLINE=1
( while sleep 1; do nvidia-smi --query-gpu=memory.used,utilization.gpu --format=csv,noheader; done ) > "$RUN/vram.log" 2>&1 &
POLL=$!
T0=$(date +%s)
echo "flags: $*" > "$RUN/flags.txt"
$BASE/venv/bin/vllm serve "$SNAP" --omni --port 8091 \
--served-model-name Qwen/Qwen-Image-2.1 \
--enforce-eager "$@" > "$RUN/serve.log" 2>&1
RC=$?
kill $POLL 2>/dev/null
echo "serve_rc=$RC wall=$(( $(date +%s) - T0 ))s" >> "$RUN/serve.log"