FROM python:3.12-slim # Bharat-Tiny-LLM demo — runs the GGUF build via llama.cpp (lighter than fp16) WORKDIR /app # System dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 \ && rm -rf /var/lib/apt/lists/* && git lfs install # Pre-download the GGUF model at build time so the Space starts fast RUN pip install --no-cache-dir "huggingface-hub<1.22.0" "llama-cpp-python>=0.3.0" RUN python3 -c "\ from huggingface_hub import hf_hub_download; \ hf_hub_download(repo_id='eulogik/Bharat-Tiny-LLM-GGUF', filename='bharat-tiny-llm-q4_k_m.gguf'); \ " # Copy app files COPY app.py requirements.txt /app/ # Install app dependencies RUN pip install --no-cache-dir -r requirements.txt ENV GRADIO_SERVER_NAME=0.0.0.0 ENV GRADIO_SERVER_PORT=7860 ENV GRADIO_ANALYTICS_ENABLED=False EXPOSE 7860 CMD ["python", "app.py"]