JairoDanielMT commited on
Commit
f60c774
1 Parent(s): 598559d

corrigiendo dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -1,22 +1,30 @@
1
- FROM python:3.11-slim
 
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  WORKDIR /app
6
 
 
7
  RUN apt-get update && \
8
  apt-get install -y --no-install-recommends \
9
  wkhtmltopdf \
10
  fonts-dejavu-core \
11
  && rm -rf /var/lib/apt/lists/*
12
 
 
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
 
16
  COPY app/ app/
17
 
 
18
  ENV PYTHONUNBUFFERED=1
19
 
 
20
  EXPOSE 7860
21
 
 
22
  CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860}"]
 
1
+ # Imagen base con Debian bullseye (tiene wkhtmltopdf en apt)
2
+ FROM python:3.11-bullseye
3
 
4
+ # Evitar prompts interactivos en apt
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
  WORKDIR /app
8
 
9
+ # Instalar dependencias de sistema necesarias para wkhtmltopdf
10
  RUN apt-get update && \
11
  apt-get install -y --no-install-recommends \
12
  wkhtmltopdf \
13
  fonts-dejavu-core \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Copiar requirements e instalar dependencias de Python
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copiar el c贸digo de la app
21
  COPY app/ app/
22
 
23
+ # Variables de entorno 煤tiles
24
  ENV PYTHONUNBUFFERED=1
25
 
26
+ # Hugging Face define $PORT en runtime, pero exponemos 7860 por convenci贸n
27
  EXPOSE 7860
28
 
29
+ # Comando de arranque
30
  CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860}"]