interview_agents_api / Dockerfile
QuentinL52's picture
Update Dockerfile
8db0f76 verified
raw
history blame
1.05 kB
# On utilise une image Python 3.11, moderne et compatible
FROM python:3.11-slim
# Définir le répertoire de travail
WORKDIR /app
# --- CORRECTION ---
# On ajoute le dossier des exécutables Python au PATH du système.
# C'est la solution standard pour les erreurs "command not found".
ENV PATH="/root/.local/bin:${PATH}"
# --- Le reste de votre 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 .
# Il est bon de mettre à jour pip avant d'installer les paquets
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"]