File size: 574 Bytes
1a22905 c6ec434 1a22905 c6ec434 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
# NOTE: Import directly from the model folder on PYTHONPATH, not from a non-existent 'DotsOCR' package
sed -i '/^from vllm\.entrypoints\.cli\.main import main$/a\
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!" |