likhonsheikh's picture
Upload folder using huggingface_hub
7ef800a verified
raw
history blame
754 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install build dependencies for llama-cpp-python
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies (llama-cpp-python compiles from source)
RUN pip install --no-cache-dir -r requirements.txt
# Download Qwen2.5-Coder-7B-Instruct Q4_K_M GGUF
RUN mkdir -p /app/models && \
curl -L -o /app/models/qwen2.5-coder-7b-instruct-q4_k_m.gguf \
"https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main/qwen2.5-coder-7b-instruct-q4_k_m.gguf"
# Copy application code
COPY app.py .
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]