Refactor: streamline core service and clean workspace

This commit is contained in:
renato97
2025-12-16 23:09:48 +00:00
parent 9fb01d5c22
commit b26248076b
18 changed files with 157 additions and 1649 deletions

View File

@@ -4,8 +4,18 @@ FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
# Evitar que los cuadros de diálogo de apt se bloqueen
ENV DEBIAN_FRONTEND=noninteractive
# Instalar Python, pip, ffmpeg, Node.js y otras dependencias del sistema
RUN apt-get update && apt-get install -y python3.10 python3-pip ffmpeg poppler-utils tesseract-ocr tesseract-ocr-spa curl && rm -rf /var/lib/apt/lists/*
# Instalar Python, pip y dependencias del sistema
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
ffmpeg \
poppler-utils \
tesseract-ocr \
tesseract-ocr-spa \
curl \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Instalar Node.js 20 usando NodeSource repository
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
@@ -18,17 +28,12 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
# Establecer el directorio de trabajo
WORKDIR /app
# Copiar el archivo de requerimientos e instalar PyTorch con soporte para CUDA
# Copiar requerimientos e instalar dependencias de Python
COPY requirements.txt .
# Instalar PyTorch y las dependencias de audio/visión compatibles con CUDA 12.1
RUN python3 -m pip install --no-cache-dir --upgrade pip
RUN python3 -m pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Instalar el resto de las dependencias
RUN python3 -m pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y tesseract-ocr tesseract-ocr-spa libgl1 libglib2.0-0
RUN python3 -m pip install --no-cache-dir easyocr pytesseract opencv-python-headless pdf2image transformers
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir \
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 && \
python3 -m pip install --no-cache-dir -r requirements.txt
# Instalar Claude CLI
RUN npm install -g @anthropic-ai/claude-code