| # ββ ShukGEN v3 β Hugging Face Spaces Dockerfile ββββββββββββββββββββββββββββββ | |
| # Uses CPU-only PyTorch to keep the image lean (no CUDA drivers needed on HF). | |
| # If you have a GPU Space, replace the torch install line with the CUDA wheel. | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM python:3.10-slim | |
| # System deps (needed by Pillow / scipy) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxrender1 \ | |
| libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Copy requirements first so Docker can cache the pip layer | |
| COPY requirements.txt . | |
| # Install ALL python deps in ONE pip call to avoid numpy conflicts | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all app files (app.py, index.html, model.pt if present) | |
| COPY . . | |
| # HF Spaces requires port 7860 | |
| EXPOSE 7860 | |
| # Run the Flask server | |
| CMD ["python", "app.py"] |