File size: 681 Bytes
d51d347
 
d48bdfc
 
 
 
 
 
 
 
 
 
d51d347
 
d48bdfc
d51d347
 
d48bdfc
d51d347
 
d48bdfc
 
 
 
d51d347
 
d48bdfc
279cdad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.9-slim

# Evita errores de interactivos
ENV PYTHONUNBUFFERED=1

# Instala ffmpeg y dependencias
RUN apt-get update && \
    apt-get install -y ffmpeg && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Crea y usa directorio
WORKDIR /app

# Copia todos los archivos
COPY . /app

# Instala dependencias (incluye gunicorn aquí)
RUN pip install --no-cache-dir -r requirements.txt

# Asegúrate de que gunicorn está en el PATH
RUN which gunicorn

# Puerto que usará Hugging Face
EXPOSE 7860

# Lanza gunicorn si está en requirements.txt
CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:7860", "app:app", "--timeout", "180"]