File size: 619 Bytes
c9d61d3
 
e810ce8
9ea2205
6226068
 
c9d61d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4e9b32
 
618f739
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
FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends git lsof wget && rm -rf /var/lib/apt/lists/*

RUN useradd -m -u 1000 user
ENV HOME=/home/user
WORKDIR /app

# Install dependencies
RUN pip install --no-cache-dir \
    "datasets>=4.0.0" \
    "huggingface_hub>=0.20.0" \
    "openai>=1.0.0" \
    "python-dotenv>=1.0.0" \
    "fastapi>=0.115.0" \
    "uvicorn>=0.32.0" \
    "sse-starlette>=2.0.0"

# Copy app
COPY . .

# HF Spaces expects port 7860
EXPOSE 7860

# Use exec form so Python receives SIGTERM directly and shuts down cleanly
STOPSIGNAL SIGTERM
CMD ["bash", "start.sh"]