Spaces:
Paused
Paused
File size: 1,961 Bytes
10d339c 65e6b09 10d339c b3ec254 10d339c 65e6b09 10d339c 4bb47bb 2ca5026 b3ec254 10d339c bc6516c 10d339c 4bb47bb 10d339c | 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | FROM python:3.10-slim
WORKDIR /app
# Install minimal system dependencies (OpenBLAS + OpenMP for the prebuilt wheel)
RUN apt-get update && apt-get install -y \
libopenblas-dev \
libopencc-dev \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Install llama-cpp-python from a prebuilt wheel (FAST - no source build).
#
# Bumped 0.3.22 -> 0.3.30 to pick up newer llama.cpp model-architecture support
# (the 2026 model families added to app.py — Qwen3.5, Granite 4.0 hybrid-Mamba,
# SmolLM3, LFM2.5 — need a recent llama.cpp to load).
#
# This uses the OFFICIAL prebuilt CPU wheel index (manylinux2014 x86_64, no
# compile). Trade-off vs the previous custom Luigi/...-free-cpu wheel: that one
# was built with OpenBLAS tuned for the free tier, whereas the official CPU wheel
# is a generic build — prompt-processing throughput may differ. For best perf,
# rebuild a 0.3.30 OpenBLAS wheel into that repo and pin it here instead.
#
# NOTE: this must be verified with a Space rebuild — confirm the new models load.
RUN pip install --no-cache-dir "llama-cpp-python==0.3.30" \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
# Fallback (previous pinned wheel, supports fewer 2026 architectures):
# RUN pip install --no-cache-dir \
# https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
# Copy and install other requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py .
COPY meeting_summarizer/ meeting_summarizer/
# Pre-download model on build (optional, speeds up first run)
# RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='unsloth/Qwen3-0.6B-GGUF', filename='Qwen3-0.6B-Q4_K_M.gguf', local_dir='./models')"
EXPOSE 7860
# Cache bust: 2026-06-19-v2 (llama-cpp-python 0.3.30 + 2026 model registry)
CMD ["python", "app.py"]
|