| FROM ubuntu:24.04 | |
| # Install uv | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| ca-certificates \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Enable bytecode compilation for faster startup | |
| ENV UV_COMPILE_BYTECODE=1 | |
| # Install dependencies first (for layer caching) | |
| COPY pyproject.toml uv.lock ./ | |
| RUN uv sync --locked --no-dev --no-install-project | |
| # Copy application code and install project | |
| COPY . . | |
| RUN uv sync --locked --no-dev | |
| # Expose Gradio port | |
| EXPOSE 7860 | |
| # Run the app | |
| CMD ["uv", "run", "app.py"] | |