Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files123456789101112131415161718192021222324FROM python:3.10-slimWORKDIR /app# Install system tools (curl for the model, build-essential just in case)RUN apt-get update && apt-get install -y \build-essential \curl \&& rm -rf /var/lib/apt/lists/*# Fix: Use the pre-built CPU wheel to skip the "Building wheel" stepRUN pip install --no-cache-dir \fastapi \uvicorn \--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \llama-cpp-python# Download MPT-7B Q2 from the link you providedRUN curl -L "https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true" -o mpt-7b-q2.gguf# Copy backend onlyCOPY app.py .EXPOSE 78601234567891011121314151617181920212223# Using bullseye for better compatibility with build toolsFROM python:3.10-bullseyeWORKDIR /app# Install curl to download the modelRUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*# Fix: This is the magic line that skips the "Building wheel" phase# It pulls a pre-compiled CPU binary for llama-cpp-pythonRUN pip install --no-cache-dir \fastapi \uvicorn \--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \llama-cpp-python# Download MPT-7B Q2RUN curl -L "https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true" -o mpt-7b-q2.gguf# Copy your backend codeCOPY app.py .EXPOSE 7860
Dockerfile+8-9