Spaces:
Runtime error

johan frachon commited on
Commit
802ec3b
·
1 Parent(s): df59ede

Ajout Dockerfile officiel

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # On utilise une version légère de Python
2
+ FROM python:3.10-slim
3
+
4
+ # On se met dans le dossier de l'app
5
+ WORKDIR /app
6
+
7
+ # On copie tout ton projet dedans
8
+ COPY . .
9
+
10
+ # On installe les outils système (Git LFS est vital pour tes gros modèles)
11
+ RUN apt-get update && apt-get install -y git git-lfs && git lfs install
12
+
13
+ # On installe tes librairies Python
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # IMPORTANT : Hugging Face écoute sur le port 7860 (pas 8501)
17
+ EXPOSE 7860
18
+
19
+ # La commande de lancement (On force le port 7860)
20
+ CMD ["streamlit", "run", "src/streamlit/app.py", "--server.port=7860", "--server.address=0.0.0.0"]