CoolFace
Apppublic

Jenjo79/kronos-forecast

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
Dockerfile34 linesDownload Raw Back to root
1FROM python:3.10-slim2 3# System deps for git (to clone Kronos) and a couple of build tools4RUN apt-get update && apt-get install -y --no-install-recommends \5        git \6        build-essential \7    && rm -rf /var/lib/apt/lists/*8 9# HF Spaces run as user 100010RUN useradd -m -u 1000 user11USER user12ENV PATH="/home/user/.local/bin:${PATH}"13WORKDIR /home/user/app14 15# Install Python deps first (better layer caching)16COPY --chown=user requirements.txt .17RUN pip install --no-cache-dir --user -r requirements.txt18 19# Clone the Kronos repo so we can import its `model` package20RUN git clone --depth 1 https://github.com/shiyu-coder/Kronos.git \21        /home/user/app/Kronos22 23# Pre-download the model weights at build time so the Space starts fast24RUN python -c "\25from huggingface_hub import snapshot_download; \26snapshot_download('NeoQuasar/Kronos-Tokenizer-2k'); \27snapshot_download('NeoQuasar/Kronos-mini'); \28print('Weights cached.')"29 30COPY --chown=user app.py .31 32EXPOSE 786033CMD ["python", "app.py"]34