QuentinL52 commited on
Commit
cb35480
·
verified ·
1 Parent(s): 7019828

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -7
Dockerfile CHANGED
@@ -1,15 +1,15 @@
1
- # On utilise une image Python 3.11, moderne et compatible
2
  FROM python:3.11-slim
3
 
4
  # Définir le répertoire de travail
5
  WORKDIR /app
6
 
7
- # --- CORRECTION ---
8
- # On ajoute le dossier des exécutables Python au PATH du système.
9
- # C'est la solution standard pour les erreurs "command not found".
10
- ENV PATH="/root/.local/bin:${PATH}"
11
 
12
- # --- Le reste de votre fichier est déjà correct ---
13
 
14
  # Configuration du Cache Hugging Face
15
  ENV HF_HOME=/app/cache
@@ -20,7 +20,6 @@ RUN apt-get update && apt-get install -y redis-server && rm -rf /var/lib/apt/lis
20
 
21
  # Copie et installation des dépendances
22
  COPY requirements.txt .
23
- # Il est bon de mettre à jour pip avant d'installer les paquets
24
  RUN pip install --upgrade pip
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
 
1
+ # Utiliser une image Python 3.11, moderne et compatible
2
  FROM python:3.11-slim
3
 
4
  # Définir le répertoire de travail
5
  WORKDIR /app
6
 
7
+ # --- LA CORRECTION CLÉ ---
8
+ # On ajoute le répertoire de travail au PYTHONPATH.
9
+ # Python saura maintenant trouver 'app.py', 'main.py', etc.
10
+ ENV PYTHONPATH /app
11
 
12
+ # --- Le reste du fichier est déjà correct ---
13
 
14
  # Configuration du Cache Hugging Face
15
  ENV HF_HOME=/app/cache
 
20
 
21
  # Copie et installation des dépendances
22
  COPY requirements.txt .
 
23
  RUN pip install --upgrade pip
24
  RUN pip install --no-cache-dir -r requirements.txt
25