Initial commit
This commit is contained in:
43
Dockerfile
Executable file
43
Dockerfile
Executable file
@@ -0,0 +1,43 @@
|
||||
# Usar una imagen base de NVIDIA con CUDA 12.1.1 y Python 3.10
|
||||
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 Node.js 20 usando NodeSource repository
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Crear un enlace simbólico para que python3 -> python
|
||||
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
|
||||
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
|
||||
|
||||
# Instalar Claude CLI
|
||||
RUN npm install -g @anthropic-ai/claude-code
|
||||
|
||||
# Instalar Gemini CLI como root
|
||||
RUN npm install -g @google/gemini-cli
|
||||
|
||||
# Copiar todo el código de la aplicación al contenedor
|
||||
COPY . .
|
||||
|
||||
# Comando por defecto para iniciar el servicio principal unificado
|
||||
CMD ["python3", "main.py"]
|
||||
Reference in New Issue
Block a user