fix(p800): define RUN_ID/RESULT_ROOT/LOG_DIR in start_server.sh

start_server.sh referenced LOG_DIR and RESULT_ROOT without defining them,
causing an unbound-variable failure under set -u. Mirror the initialization
from run_bench.sh so the script can run standalone.
This commit is contained in:
Quantong Qiu 2026-07-09 02:53:38 +00:00
parent 7e614fb702
commit 8324d944f2

View File

@ -9,7 +9,11 @@ source "${SCRIPT_DIR}/../../scripts/common/server_docker.sh"
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${SCRIPT_DIR}/config.env" source "${SCRIPT_DIR}/config.env"
log_init "${RESULT_ROOT:-/tmp/${EXPERIMENT_NAME}}/logs/start_server.log" RUN_ID="${RUN_ID:-$(date '+%Y%m%d-%H%M%S')}"
RESULT_ROOT="${RESULT_ROOT:-${SCRIPT_DIR}/results/${RUN_ID}}"
LOG_DIR="${RESULT_ROOT}/logs"
log_init "${LOG_DIR}/start_server.log"
log "starting server for ${EXPERIMENT_NAME}" log "starting server for ${EXPERIMENT_NAME}"
log "model: ${MODEL_PATH}" log "model: ${MODEL_PATH}"
log "port: ${PORT}" log "port: ${PORT}"