Files
mineru-rocm/docker/scripts/entrypoint.sh
T
2026-06-12 10:56:36 +08:00

24 lines
739 B
Bash

#!/bin/bash
# =============================================================================
# MinerU ROCm 统一入口 — 启动时执行补丁,然后启动指定服务
# =============================================================================
set -e
VENV=/opt/mineru_venv
SCRIPTS_DIR=/opt/scripts
echo "[entrypoint] running patches..."
# vllm 平台补丁
if [ -f ${SCRIPTS_DIR}/patch_vllm_platform.py ]; then
${VENV}/bin/python ${SCRIPTS_DIR}/patch_vllm_platform.py
fi
# MinerU 推理补丁
if [ -f ${SCRIPTS_DIR}/apply_mineru_patches.py ]; then
${VENV}/bin/python ${SCRIPTS_DIR}/apply_mineru_patches.py || echo "[entrypoint] apply_mineru_patches.py failed (non-fatal)"
fi
echo "[entrypoint] starting: $*"
exec "$@"