# Use Python 3.13 FROM python:3.13-slim # Set working directory WORKDIR /app # Install system dependencies for document processing RUN apt-get update && apt-get install -y --no-install-recommends \ tesseract-ocr \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ curl \ && rm -rf /var/lib/apt/lists/* # Install uv for fast dependency resolution RUN pip install uv # Copy requirements first for better caching COPY requirements.txt . # Install Python dependencies with uv # Using --system to install into the system Python (not a venv) # --prerelease=allow is needed for openhands-ai which depends on pre-release packages RUN uv pip install --system --no-cache --prerelease=allow -r requirements.txt # Copy application code COPY . . # Create reports directory RUN mkdir -p reports # Expose Gradio default port EXPOSE 7860 # Set environment variables for Gradio ENV GRADIO_SERVER_NAME="0.0.0.0" ENV GRADIO_SERVER_PORT="7860" # Run the application CMD ["python", "gradio_demo.py"]