convert_test / Dockerfile
Bentham's picture
Update Dockerfile
4fd8408 verified
raw
history blame contribute delete
825 Bytes
# Utiliser l'image Python officielle
FROM python:3.10-slim
# Installer pandoc, antiword et ses dépendances via apt
# Ajouter ghostscript et les bibliothèques nécessaires pour OpenCV
RUN apt-get update && apt-get install -y \
pandoc \
libgl1-mesa-glx \
antiword \
ghostscript \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# Définir le répertoire de travail
WORKDIR /app
# Copier le fichier requirements.txt et installer les dépendances Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copier le code de l'application
COPY . .
# Exposer le port 7860 (port attendu par Hugging Face Spaces)
EXPOSE 7860
# Commande pour démarrer l'application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]