File size: 653 Bytes
557ee65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.12-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    HF_SPACE=true \
    STORAGE_ENABLED=false

WORKDIR /app

# System deps (keep minimal; add build-essential only if you need wheels compiled)
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy code
COPY . /app

# Install dependencies
# Prefer requirements.txt if you have it; otherwise generate one from pyproject for Docker usage.
RUN pip install --upgrade pip \
    && pip install -r requirements.txt

# HuggingFace Spaces uses port 7860
EXPOSE 7860

CMD ["python", "app.py"]