34 lines
932 B
Docker
34 lines
932 B
Docker
FROM python:3.11-slim
|
|
|
|
# Install system dependencies for OCR
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
tesseract-ocr \
|
|
tesseract-ocr-deu \
|
|
git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy pyproject.toml first for dependency caching
|
|
COPY pyproject.toml .
|
|
|
|
# Install dependencies only (not the package itself yet)
|
|
RUN pip install --no-cache-dir \
|
|
click watchdog pytesseract pdfplumber python-docx litellm httpx \
|
|
pydantic pydantic-settings fastapi uvicorn python-multipart pyyaml python-slugify
|
|
|
|
# Copy source code into /app/ingestion/ so imports work
|
|
COPY . /app/ingestion/
|
|
|
|
# Set PYTHONPATH so "import ingestion" resolves to /app/ingestion/
|
|
ENV PYTHONPATH=/app
|
|
|
|
# Create inbox directory
|
|
RUN mkdir -p /app/inbox
|
|
|
|
# Expose upload server port
|
|
EXPOSE 8001
|
|
|
|
# Default: run the upload web server
|
|
CMD ["uvicorn", "ingestion.web.upload:app", "--host", "0.0.0.0", "--port", "8001"]
|