File size: 900 Bytes
131dfa0 | 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
WORKDIR /app
# Install system dependencies for OpenBLAS
RUN apt-get update && apt-get install -y \
gcc g++ make cmake git libopenblas-dev curl \
&& rm -rf /var/lib/apt/lists/*
# Install llama-cpp-python with prebuilt wheel (avoids timeout)
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.22-cp310-cp310-linux_x86_64.whl
# Copy app files
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
# Download model from Hugging Face Hub at build time
RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download('ikramknd/atlas-chat-9b-merged-Q4_K_S-GGUF', filename='atlas-chat-9b-merged-q4_k_s-imat.gguf', local_dir='/app/models')"
ENV PYTHONUNBUFFERED=1
ENV GRADIO_SERVER_NAME=0.0.0.0
EXPOSE 7860
CMD ["python", "app.py"] |