Files
breakpilot-lehrer/klausur-service/Dockerfile.base
Benjamin Admin 984dfab975 fix(ocr-pipeline): add libgl1 for RapidOCR OpenCV dependency
RapidOCR pulls in full opencv-python which requires libGL.so.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:30:12 +01:00

27 lines
749 B
Docker

# Base image with system dependencies + Python packages.
# These change rarely — build once, reuse on every --no-cache.
#
# Rebuild manually when requirements.txt or system deps change:
# docker build -f klausur-service/Dockerfile.base -t klausur-base:latest klausur-service/
#
FROM python:3.11-slim
WORKDIR /app
# System dependencies (Tesseract OCR, curl for healthcheck)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
tesseract-ocr \
tesseract-ocr-deu \
tesseract-ocr-eng \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Python dependencies
COPY backend/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Clean up pip cache
RUN rm -rf /root/.cache/pip