Spaces:
Build error
Build error
| FROM python:3.9-slim | |
| # Instalar dependencias del sistema necesarias para OCR y frontend | |
| RUN apt-get update && apt-get install -y \ | |
| ghostscript \ | |
| tesseract-ocr \ | |
| poppler-utils \ | |
| libxml2 \ | |
| unpaper \ | |
| nodejs \ | |
| npm \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| # Configurar el directorio de trabajo para el frontend | |
| WORKDIR /app/frontend | |
| # Copiar el archivo package.json y el lockfile para instalar dependencias | |
| COPY frontend/package.json frontend/package-lock.json* ./ | |
| RUN npm install # Instalaci贸n de dependencias de Node.js | |
| # Copiar todo el c贸digo fuente del frontend | |
| COPY frontend/ ./ | |
| # Construir el frontend | |
| RUN npm run build # Construir el frontend | |
| # Configurar el directorio de trabajo para el backend | |
| WORKDIR /app | |
| # Instalar las dependencias de Python | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copiar todo el c贸digo del backend | |
| COPY . . | |
| # Exponer el puerto para la aplicaci贸n | |
| EXPOSE 7860 | |
| # Comando para ejecutar la aplicaci贸n | |
| CMD ["python", "app.py"] | |