Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files123456783451067813149101112131415161718181920FROM python:3.10-slim
# Install system dependenciesRUN apt-get update && apt-get install -y \ build-essential \ python3-dev \ wget \ && rm -rf /var/lib/apt/lists/*# Install wget to get the modelRUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
# The -q flag makes it quiet so the logs don't hit the 2MB limit# 1. Download the GGUF model (Quiet mode)RUN wget -q -O model.gguf https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf
# Install modern llama-cpp and web serverRUN pip install --no-cache-dir llama-cpp-python fastapi uvicorn# 2. Install llama-cpp-python using a PRE-BUILT wheel# This skips the "Building wheel" phase and finishes in secondsRUN 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
# 3. Install web server basicsRUN pip install --no-cache-dir fastapi uvicorn
COPY app.py .
# Port 7860 is required for Hugging Face Spaces# Port 7860 for Hugging FaceCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]Dockerfile+11-10