Add OCR HPI configuration and update docker-compose.yml

- Introduced a new configuration file, `ocr_hpi.yaml`, to define the OCR pipeline and specify the Russian language model.
- Updated the `docker-compose.yml` to mount the new configuration file and modified the OCR service command to include the configuration path.
- These changes enhance the OCR service's capabilities by allowing for customizable pipeline settings and improved language support.
This commit is contained in:
Yury Kossakovsky
2025-08-29 16:12:48 -06:00
parent a12cf92cae
commit cc13a8ac4e
2 changed files with 6 additions and 1 deletions

View File

@@ -758,11 +758,12 @@ 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"
exec python -m paddlex --serve --pipeline OCR --device cpu --port 8080 --hpi_config /app/ocr_hpi.yaml"
volumes:
- paddleocr_cache:/root/.paddleocr
- paddle_cache:/root/.cache/paddle
- paddlex_data:/root/.paddlex
- ./paddlex/ocr_hpi.yaml:/app/ocr_hpi.yaml:ro
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080 > /dev/null || exit 1"]
interval: 30s

4
paddlex/ocr_hpi.yaml Normal file
View File

@@ -0,0 +1,4 @@
pipeline: OCR
model:
lang: ru