24 lines
739 B
Bash
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 "$@"
|