jlamperez commited on
Commit
9b4d0b5
·
1 Parent(s): 56b6af9

Add Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Usar Python 3.12
2
+ FROM python:3.12-slim
3
+
4
+ # Instalar dependencias del sistema si las necesitas (ffmpeg, etc.)
5
+ RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ libgl1 \
8
+ linux-libc-dev \
9
+ build-essential \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Crear directorio de trabajo
13
+ WORKDIR /app
14
+
15
+ # Copiar e instalar requirements
16
+ COPY requirements.txt /app/requirements.txt
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copiar el resto del código
20
+ COPY . /app
21
+
22
+ # Hugging Face marca el puerto en la env PORT
23
+ ENV PORT=7860
24
+
25
+ # Comando de arranque: tu app de Gradio
26
+ CMD ["python", "app.py"]
27
+