File size: 681 Bytes
d2bc8de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 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"]