Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # System deps (minimal). git/curl are fine for HF env debugging/fetching. | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install uv | |
| RUN pip install --no-cache-dir uv | |
| # Copy project metadata first for better layer caching | |
| COPY pyproject.toml uv.lock ./ | |
| # Install dependencies into the system interpreter | |
| RUN uv sync --frozen --no-dev | |
| # Copy only the FLUX application code | |
| COPY app_flux.py main_flux.py start.sh README.md ./ | |
| # Ensure start script is executable | |
| RUN chmod +x /app/start.sh | |
| # HF Spaces uses port 7860 for the public web app | |
| EXPOSE 7860 | |
| # (8000 is used internally for FastAPI; not required to expose, but ok if you want) | |
| EXPOSE 8000 | |
| CMD ["/app/start.sh"] | |