myLLM / Dockerfile
ikramknd's picture
Create Dockerfile
131dfa0 verified
Raw
History Blame Contribute Delete
900 Bytes
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"]