FROM python:3.10-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ libmagic1 \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt . RUN pip install -r requirements.txt # Copy application files COPY main.py . COPY app.py . COPY utils.py . COPY schema.py . COPY mcp_context.json . # Copy documentation and metadata COPY README.md LICENSE NOTICE ./ # Copy third-party licenses COPY third_party/ ./third_party/ # Copy test files COPY tests/ tests/ # Create a test script RUN echo '#!/bin/bash\npytest -v "$@"' > /usr/local/bin/run-tests && \ chmod +x /usr/local/bin/run-tests # Expose port EXPOSE 7860 # Run the integrated server CMD ["python", "app.py"]