Mauricio-100 commited on
Commit
524e126
·
verified ·
1 Parent(s): 9ff5ec2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -8
Dockerfile CHANGED
@@ -1,14 +1,23 @@
1
  FROM python:3.10-slim
2
 
3
- # Installer les dépendances
4
- RUN pip install --no-cache-dir torch transformers accelerate fastapi uvicorn[speed] safetensors
 
 
 
5
 
6
- # Copier le code de l’app
7
  WORKDIR /app
8
- COPY app.py /app/app.py
9
 
10
- # Exposer le port (par défaut Hugging Face écoute sur 7860)
11
- EXPOSE 7860
 
12
 
13
- # Lancer FastAPI avec uvicorn
14
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Installer dépendances système pour audio/vidéo
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg \
6
+ nginx \
7
+ && rm -rf /var/lib/apt/lists/*
8
 
 
9
  WORKDIR /app
 
10
 
11
+ # Installer dépendances Python
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Copier ton code
16
+ COPY app.py .
17
+ COPY nginx.conf /etc/nginx/nginx.conf
18
+
19
+ # Exposer ports
20
+ EXPOSE 7860 8080
21
+
22
+ # Lancer Nginx + Uvicorn
23
+ CMD service nginx start && uvicorn app:app --host 0.0.0.0 --port 7860