mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-04-26 09:48:23 +00:00
Update OCR service command in docker-compose.yml to use pipeline configuration file
- Modified the OCR service command to check for the existence of the pipeline configuration file and download it if not present, enhancing the setup process. - Added a volume mount for the paddlex directory to ensure access to necessary files during execution.
This commit is contained in:
@@ -758,11 +758,15 @@ services:
|
||||
python -m pip install --upgrade pip; \
|
||||
python -m pip install --no-cache-dir 'paddlex[ocr]'; \
|
||||
python -m paddlex --install serving; \
|
||||
exec python -m paddlex --serve --pipeline OCR --device cpu --port 8080"
|
||||
if [ ! -f /app/PP-ChatOCRv3-doc.yaml ]; then \
|
||||
python -m paddlex --get_pipeline_config PP-ChatOCRv3-doc --save_path /app; \
|
||||
fi; \
|
||||
exec python -m paddlex --serve --pipeline /app/PP-ChatOCRv3-doc.yaml --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
|
||||
|
||||
Reference in New Issue
Block a user