Mution commited on
Commit
3f9da2c
·
verified ·
1 Parent(s): fcefe7a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile CHANGED
@@ -1,8 +1,19 @@
1
  FROM python:3.9-slim
 
2
  WORKDIR /app
 
 
3
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
 
4
  COPY requirements.txt .
5
  RUN pip install --no-cache-dir -r requirements.txt
 
 
6
  COPY . .
 
 
7
  EXPOSE 7860
 
 
8
  CMD ["python", "app.py"]
 
1
  FROM python:3.9-slim
2
+
3
  WORKDIR /app
4
+
5
+ # Instalamos git por si alguna librería lo requiere al compilar
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Copiamos primero los requerimientos para optimizar la caché de Docker
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copiamos el resto de los archivos del servidor
13
  COPY . .
14
+
15
+ # Puerto expuesto para Hugging Face Spaces
16
  EXPOSE 7860
17
+
18
+ # Comando de arranque
19
  CMD ["python", "app.py"]