#!/usr/bin/env bash
set -euo pipefail

container="${MVP_HEAD_CONTAINER:-argus-ray-head}"
model_source="${MODEL_SOURCE:-}"
if [[ -n "${1:-}" ]]; then
  model_source="$1"
fi

argv=(python3 /workspace/mvp/scripts/serve_llm_smoke.py)
if [[ -n "${model_source}" ]]; then
  argv+=(--model-source "${model_source}")
fi
argv+=(--accelerator-type "${ARGUS_ACCELERATOR_TYPE:-H20}")

echo "[host] run Ray Serve LLM smoke test in container: ${container}" >&2
docker exec -it "${container}" bash -lc "$(printf '%q ' "${argv[@]}")"

