-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 727 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 727 Bytes
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
# Usar una imagen base oficial de Python
FROM python:3.11-slim
# Establecer el directorio de trabajo dentro del contenedor
WORKDIR /app
# Instalar dependencias del sistema operativo necesarias para pypdf y unstructured
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
poppler-utils \
tesseract-ocr \
&& rm -rf /var/lib/apt/lists/*
# Copiar el archivo de dependencias
COPY requirements.txt .
# Instalar las dependencias de Python
RUN pip install --no-cache-dir -r requirements.txt
# Copiar todo el código de la aplicación
COPY . .
# Exponer el puerto
EXPOSE 8000
# Comando para ejecutar la aplicación
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]