Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1 unmodified line23456789101112131415161718192021221 unmodified lineWORKDIR /app# 1. Install wgetRUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*# 2. Install pre-built llama-cpp (NO BUILDING HANGS)RUN pip install --no-cache-dir \fastapi \uvicorn \--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \llama-cpp-python# 3. Download MPT-7B Q2 as 'model.gguf' (Matches your script)RUN wget -q -O model.gguf \"https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true"# 4. Copy the script you foundCOPY app.py .EXPOSE 78601 unmodified line23456789101112131415161718192021221 unmodified lineWORKDIR /app# 1. Install wget (essential for the model)RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*# 2. Install llama-cpp-python FORCING the binary (No compilation allowed)# We use version 0.2.76 as it is highly stable for MPT modelsRUN pip install --no-cache-dir fastapi uvicornRUN pip install llama-cpp-python==0.2.76 \--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \--prefer-binary# 3. Download the model silentlyRUN wget -q -O model.gguf \"https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true"# 4. Copy your scriptCOPY app.py .EXPOSE 7860
Dockerfile+8-8