Spaces:
Runtime error
Runtime error
| FROM python:3.11-slim | |
| # Install system dependencies for PDF and Node.js for potential MCP extensions | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| gnupg \ | |
| && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up a new user to avoid running as root | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| WORKDIR /app | |
| # Copy requirements and install | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application | |
| COPY --chown=user . . | |
| # Expose the port defined in README.md | |
| EXPOSE 7860 | |
| # Start the server | |
| CMD ["python", "app.py"] | |