spacecs3b / Dockerfile
owlninjam's picture
Update Dockerfile
6647f42 verified
# Dockerfile
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install llama-cpp-python from its prebuilt wheel index for CPU
RUN pip install --no-cache-dir \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
llama-cpp-python==0.2.24
# Copy and install Python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Download the NEW model file
RUN wget --progress=bar:force:noscroll -O zephyr-quiklang-3b-4k.Q4_K_M.gguf \
https://huggingface.co/TheBloke/zephyr-quiklang-3b-4K-GGUF/resolve/main/zephyr-quiklang-3b-4k.Q4_K_M.gguf
# Copy the API application file
COPY api.py .
# Expose the port Hugging Face uses
EXPOSE 7860
# Command to run the Uvicorn server on the public port
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]