Sign inSign up

silentprior/paperless-paddle-ocr

By silentprior

Updated 6 days ago

PaddleOCR PP-OCRv6 worker for paperless-ngx

Image
Machine learning & AI
Content management system
0

585

silentprior/paperless-paddle-ocr repository overview

paperless-paddle-ocr

A CPU-friendly sidecar that OCRs paperless-ngx documents with PaddleOCR PP-OCRv6 and writes the extracted text back via the paperless-ngx API.

  • Full source, issue tracker, and docs: https://github.com/silentprior/paperless-paddle-ocr
  • No poppler / system OCR binaries needed (PDF pages render via PyMuPDF)
  • Runs as non-root, ships a HEALTHCHECK, multi-arch (linux/amd64, linux/arm64)
  • Fully configured via environment variables — no image rebuild needed to tune

Supported tags

  • latest — most recent tagged release
  • 1.0.0, 1.0, 1 — semantic version tags (immutable per-patch tag recommended for production)

Quickstart

docker run -d \
  --name paperless-paddle-ocr \
  -e PAPERLESS_BASE_URL="http://your-paperless-host:8000" \
  -e PAPERLESS_API_TOKEN="your_token_here" \
  -e PAPERLESS_INPUT_TAG="to_ocr" \
  -e PAPERLESS_OUTPUT_TAG="ocr_done" \
  -v paddle-ocr-cache:/app/.paddle_cache \
  -p 8081:8080 \
  silentprior/paperless-paddle-ocr:latest

Or with Docker Compose — see the docker-compose.yml in the source repo.

Tag any paperless-ngx document with your PAPERLESS_INPUT_TAG (default: to_ocr) and the worker will pick it up on its next poll.

Key environment variables

VariableDefaultDescription
PAPERLESS_BASE_URL(required)URL of your paperless-ngx instance
PAPERLESS_API_TOKEN(required)Paperless API token
PAPERLESS_INPUT_TAG(none — all docs)Only process documents with this tag
PAPERLESS_OUTPUT_TAG(none)Tag applied after a successful OCR
PAPERLESS_ERROR_TAG(none)Tag applied if OCR fails
PAPERLESS_PROCESSING_TAGpaddle_processingTemporary tag applied while a document is being OCR'd
PAPERLESS_PROCESSED_TAGpaddle_processedTag applied after successful OCR to prevent reprocessing
PAPERLESS_TRACKING_TAGpaddle_processedLegacy alias for PAPERLESS_PROCESSED_TAG
PAPERLESS_REPROCESSfalseReprocess completed documents; documents being processed remain excluded
PAPERLESS_DRY_RUNfalseLog intended changes without writing them
PAPERLESS_RUN_MODEdaemondaemon (loop) or oneshot
OCR_LANGenPaddleOCR language code
OCR_TIERsmalltiny | small | medium
OCR_ENGINEpaddlepaddle | onnxruntime | openvino
OCR_DPI200PDF render DPI
OCR_THREADS4CPU threads for inference

Full reference: see the docstring in ocr_worker.py or docs/CONFIGURATION.md.

License

MIT — see the source repository for details.

Tag summary

Content type

Image

Digest

sha256:286a13524

Size

525.9 MB

Last updated

6 days ago

docker pull silentprior/paperless-paddle-ocr