feat: add OCR service container (refs #64)
Some checks failed
Deploy to Staging / Build Images (pull_request) Successful in 7m41s
Deploy to Staging / Deploy to Staging (pull_request) Failing after 13s
Deploy to Staging / Verify Staging (pull_request) Has been skipped
Deploy to Staging / Notify Staging Ready (pull_request) Has been skipped
Deploy to Staging / Notify Staging Failure (pull_request) Successful in 8s
Some checks failed
Deploy to Staging / Build Images (pull_request) Successful in 7m41s
Deploy to Staging / Deploy to Staging (pull_request) Failing after 13s
Deploy to Staging / Verify Staging (pull_request) Has been skipped
Deploy to Staging / Notify Staging Ready (pull_request) Has been skipped
Deploy to Staging / Notify Staging Failure (pull_request) Successful in 8s
Add Python-based OCR service container (mvp-ocr) as the 6th service: - Python 3.11-slim with FastAPI/uvicorn - Tesseract OCR with English language pack - pillow-heif for HEIC image support - opencv-python-headless for image preprocessing - Health endpoint at /health - Unit tests for health, HEIC support, and Tesseract availability Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
23
ocr/Dockerfile
Normal file
23
ocr/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
# System dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-eng \
|
||||
libtesseract-dev \
|
||||
libheif1 \
|
||||
libheif-dev \
|
||||
libglib2.0-0 \
|
||||
libmagic1 \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Python dependencies
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user