stvnnnnnn commited on
Commit
4594737
·
verified ·
1 Parent(s): 8eb951d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Evita bufers en los logs
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ WORKDIR /app
7
+
8
+ # Instalar dependencias del sistema
9
+ RUN apt-get update && apt-get install -y git && apt-get clean
10
+
11
+ # Instalar dependencias Python
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copiar el backend
16
+ COPY app.py .
17
+
18
+ EXPOSE 7860
19
+
20
+ # Comando para ejecutar FastAPI en Hugging Face
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]