Spaces:
Sleeping
Sleeping
File size: 830 Bytes
761dd17 f7e48d4 c266e2c f7e48d4 c266e2c 761dd17 f7e48d4 78a1d7d e25f977 761dd17 e25f977 5084e82 761dd17 e25f977 7037831 761dd17 7037831 06f8739 cb2d3f9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | FROM python:3.10-slim
# Install system tools and the specific math library required by the wheel
RUN apt-get update && apt-get install -y \
wget \
libgomp1 \
libopenblas0 \
libopenblas-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Use the specific HF-optimized CPU wheel (0.3.16)
RUN pip install --no-cache-dir \
https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.16-cp310-cp310-linux_x86_64.whl
# Download your Kwen model
RUN wget -L https://huggingface.co/TheKwenFoundation/Kwen-4B/resolve/main/kwen-4b-q4_k_m.gguf -q -O kwen-4b-q4_k_m.gguf
# Standard API requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |