interview_agents_api / Dockerfile
QuentinL52's picture
Update Dockerfile
cb35480 verified
raw
history blame
948 Bytes
# Utiliser une image Python 3.11, moderne et compatible
FROM python:3.11-slim
# Définir le répertoire de travail
WORKDIR /app
# --- LA CORRECTION CLÉ ---
# On ajoute le répertoire de travail au PYTHONPATH.
# Python saura maintenant où trouver 'app.py', 'main.py', etc.
ENV PYTHONPATH /app
# --- Le reste du fichier est déjà correct ---
# Configuration du Cache Hugging Face
ENV HF_HOME=/app/cache
RUN mkdir -p /app/cache
# Installation de Redis
RUN apt-get update && apt-get install -y redis-server && rm -rf /var/lib/apt/lists/*
# Copie et installation des dépendances
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copie du code de l'application
COPY . .
# Rendre le script de démarrage exécutable
RUN chmod +x ./start.sh
# Exposer le port par défaut de Hugging Face Spaces
EXPOSE 7860
# Définir le script de démarrage comme commande principale
CMD ["./start.sh"]