Update OCR service command in docker-compose.yml to use 'paddlex[ocr]' and streamline pipeline execution

- Changed the installation command to use 'paddlex[ocr]' for focused functionality.
- Updated the command to directly serve the OCR pipeline without checking for a configuration file, simplifying the setup process.
This commit is contained in:
Yury Kossakovsky
2025-08-29 18:25:13 -06:00
parent 4111aa02cf
commit daf2e94f71

View File

@@ -756,17 +756,13 @@ services:
restart: unless-stopped
command: /bin/sh -c "set -e; \
python -m pip install --upgrade pip; \
python -m pip install --no-cache-dir 'paddlex[all]'; \
python -m pip install --no-cache-dir 'paddlex[ocr]'; \
python -m paddlex --install serving; \
if [ ! -f /app/PP-ChatOCRv5-doc.yaml ]; then \
python -m paddlex --get_pipeline_config PP-ChatOCRv5-doc --save_path /app; \
fi; \
exec python -m paddlex --serve --pipeline /app/PP-ChatOCRv5-doc.yaml --device cpu --port 8080"
exec python -m paddlex --serve --pipeline OCR --device cpu --port 8080"
volumes:
- paddleocr_cache:/root/.paddleocr
- paddle_cache:/root/.cache/paddle
- paddlex_data:/root/.paddlex
- ./paddlex:/app
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080 > /dev/null || exit 1"]
interval: 30s