#!/bin/bash
# Docker 多机分组评测
# 用法：GROUP=1 ./run_docker_group.sh

GROUP="${GROUP:-1}"
MODEL="${MODEL:-DeepSeek-V4-Flash-Int8}"
API_URL="${API_URL:-http://localhost:30000/v1}"
HOST_EVALSCOPE="${HOST_EVALSCOPE:-/data1/sora/evalscope}"
OUTPUT_DIR="/opt/evalscope/output_group${GROUP}"

docker run -it --rm \
  --network host \
  -v "${HOST_EVALSCOPE}:/opt/evalscope" \
  -v "${HOST_EVALSCOPE}/datasets:/opt/evalscope/datasets" \
  -v "${HOST_EVALSCOPE}/output_group${GROUP}:/opt/evalscope/output_group${GROUP}" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  evalscope-complete-py312:latest \
  bash -c "
    cd /opt/evalscope &&
    python bash/run.py \
      --model ${MODEL} \
      --api-url ${API_URL} \
      --dataset-dir /opt/evalscope \
      --output-dir ${OUTPUT_DIR} \
      --suite group${GROUP} \
      --limit none
  "
