- Implement tests for database generator to ensure proper session handling. - Create tests for EXIF extraction and conversion functions. - Add tests for image-related endpoints, ensuring proper data retrieval and isolation between clients. - Develop tests for OCR functionality, including language detection and text extraction. - Introduce tests for the image processing pipeline, covering success and failure scenarios. - Validate rate limiting functionality and ensure independent counters for different clients. - Implement scraper tests to verify HTML content fetching and error handling. - Add unit tests for various services, including storage and filename generation. - Establish worker entry point for ARQ to handle background image processing tasks.
28 lines
574 B
Docker
28 lines
574 B
Docker
FROM python:3.12-slim
|
|
|
|
# Dépendances système (Tesseract OCR + données de langues)
|
|
RUN apt-get update && apt-get install -y \
|
|
tesseract-ocr \
|
|
tesseract-ocr-fra \
|
|
tesseract-ocr-eng \
|
|
libgl1-mesa-glx \
|
|
libglib2.0-0 \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Dépendances Python
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Code source
|
|
COPY . .
|
|
|
|
# Répertoires de données
|
|
RUN mkdir -p data/uploads data/thumbnails
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|