File size: 794 Bytes
f09fb4b 7ef800a f09fb4b 7ef800a f09fb4b 7ef800a f09fb4b 7ef800a f09fb4b 8910367 f09fb4b 8910367 f09fb4b 7ef800a |
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 29 30 31 32 |
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 and static files
COPY app.py .
COPY static/ ./static/
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]
|