luck210 commited on
Commit
61f3c61
·
verified ·
1 Parent(s): ae6c842

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,20 +1,19 @@
1
- # Image de base Python
2
- FROM python:3.9-slim
3
-
4
- # Installer les dépendances système
5
- RUN apt-get update && apt-get install -y gcc libffi-dev libnacl-dev && apt-get clean
6
 
7
  # Définir le répertoire de travail
8
  WORKDIR /app
9
 
10
  # Copier les fichiers nécessaires
11
  COPY requirements.txt .
12
- RUN pip install --no-cache-dir -r requirements.txt
13
-
14
  COPY app.py .
15
 
16
- # Exposer le port utilisé par FastAPI
 
 
 
17
  EXPOSE 7860
18
 
19
- # Lancer l'application
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ # Utiliser une image Python légère
2
+ FROM python:3.9
 
 
 
3
 
4
  # Définir le répertoire de travail
5
  WORKDIR /app
6
 
7
  # Copier les fichiers nécessaires
8
  COPY requirements.txt .
 
 
9
  COPY app.py .
10
 
11
+ # Installer les dépendances
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Exposer le port correct pour Hugging Face Spaces
15
  EXPOSE 7860
16
 
17
+ # Lancer l'application FastAPI avec Uvicorn
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
19
+