File size: 936 Bytes
72a9562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# ── Build stage ───────────────────────────────────────────────────────────────
FROM python:3.11-slim

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

WORKDIR /app

# Clone Kronos source at build time (avoids runtime clone delay)
RUN git clone --depth 1 https://github.com/shiyu-coder/Kronos /app/Kronos

# Install Python deps first (layer cache friendly)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application source
COPY app.py predictor.py data_fetcher.py ./

# HuggingFace Spaces default port
EXPOSE 7860

# KRONOS_DIR tells predictor.py where the source lives (already cloned above)
ENV KRONOS_DIR=/app/Kronos

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