# ChatUI Studio — Docker image for HuggingFace Spaces # Pure FastAPI + transformers app, listens on port 7860. FROM python:3.12-slim # System deps for sentencepiece / torch RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Install Python deps first (cache layer) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY app.py ./ COPY static ./static COPY README.md ./ # HuggingFace Spaces runs everything on port 7860 ENV HF_HOME=/tmp/hf_cache ENV TRANSFORMERS_CACHE=/tmp/hf_cache ENV PORT=7860 EXPOSE 7860 CMD ["python", "app.py"]