- Slim core deps: move ML stack to optional extras (paddle/tables/figures/scientific/full) - Lazy settings proxy with config search paths (env var, cwd, user dir) - New commands: init, demo, setup [basic|full], first-run guard on run/watch - Engine-aware preprocessing: Paddle gets original image (fixes dark mode 0.83->0.95) - Results table shows Skipped count; lazy run-dir creation - kg_ocr marked experimental with extra, Docker defaults with OCR_PIPELINE_CONFIG - 25/25 tests, ruff clean
26 lines
636 B
Docker
26 lines
636 B
Docker
FROM python:3.11-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
tesseract-ocr \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml uv.lock ./
|
|
RUN pip install --no-cache-dir uv && uv sync --frozen --no-dev --no-install-project
|
|
|
|
COPY src ./src
|
|
# Optional ML stack: docker build --build-arg EXTRAS="--extra full" .
|
|
ARG EXTRAS=""
|
|
RUN uv sync --frozen --no-dev ${EXTRAS}
|
|
|
|
COPY docker/config.docker.yaml ./config.docker.yaml
|
|
|
|
ENV PATH="/app/.venv/bin:$PATH" \
|
|
OCR_PIPELINE_CONFIG=/app/config.docker.yaml \
|
|
OMP_NUM_THREADS=4
|
|
|
|
ENTRYPOINT ["ocr-pipeline"]
|