File size: 1,169 Bytes
f2037ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b7c19b5
 
f2037ee
 
 
 
 
 
 
 
b7c19b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# ── 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"]