File size: 563 Bytes
1a22905 960b4fa 1a22905 960b4fa 1a22905 c6ec434 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/bash
# patch_vllm.sh
# Patches the vLLM entrypoint to register the DotsOCR model
set -e
echo "Patching vLLM entrypoint to register DotsOCR model..."
# Patch the vLLM script to import the DotsOCR modeling code
# Import via the DotsOCR package so relative imports inside the module resolve
sed -i '/^from vllm\.entrypoints\.cli\.main import main$/a\
from DotsOCR import modeling_dots_ocr_vllm' $(which vllm)
echo "vLLM script after patch:"
grep -A 1 'from vllm.entrypoints.cli.main import main' $(which vllm)
echo "vLLM patching completed successfully!" |