Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files12345678910111213141516171819202122232425262728293031# Base imageFROM python:3.10-slim# Set working directoryWORKDIR /app# Install runtime dependencies only (keep it slim)RUN apt-get update && apt-get install -y \wget \curl \&& rm -rf /var/lib/apt/lists/*# Install FastAPI, uvicorn, and llama-cpp-python prebuilt wheel (CPU)RUN pip install --no-cache-dir \fastapi \uvicorn \--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \llama-cpp-python==0.1.81# Download the MPT-7B quantized modelRUN wget -q -O mpt-7b-q2.gguf \"https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true"# Copy your FastAPI appCOPY app.py .# Expose the port HF Spaces expectsEXPOSE 8080# Run the appCMD ["python", "app.py"]123456789101112131415161718192021222324252627FROM python:3.10-slimWORKDIR /app# Install wget and build toolsRUN apt-get update && apt-get install -y \wget \git \&& rm -rf /var/lib/apt/lists/*# Install Python dependenciesRUN pip install --no-cache-dir \fastapi \uvicorn[standard] \torch \transformers# Download model (example GGUF from Hugging Face)RUN wget -q -O mpt-7b-q2.gguf \"https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true"# Copy appCOPY app.py .EXPOSE 7860CMD ["python", "app.py"]
Dockerfile+9-13