File size: 789 Bytes
af61b34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
FROM python:3.11-slim

WORKDIR /app

# System dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Install only serving dependencies (no torch needed — ONNX Runtime only)
COPY requirements-serve.txt .
RUN pip install --no-cache-dir -r requirements-serve.txt

# Copy application code
COPY service/ service/
COPY decision/ decision/
COPY streaming_intent/ streaming_intent/
COPY config/ config/
COPY list/ list/
COPY artifacts/onnx_int8/ artifacts/onnx_int8/
COPY artifacts/config/ artifacts/config/

# HF Spaces expects port 7860
ENV PORT=7860
ENV PYTHONUNBUFFERED=1
ENV REQUIRE_AUTH=false
ENV DISABLE_DOCS=false

EXPOSE 7860

CMD ["uvicorn", "service.app:app", "--host", "0.0.0.0", "--port", "7860"]