| |
| FROM python:3.11-slim |
|
|
| |
| RUN apt-get update && \ |
| apt-get install -y git build-essential cmake wget curl && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN git clone https://github.com/ggml-org/llama.cpp.git /llama.cpp |
| WORKDIR /llama.cpp |
|
|
| |
| RUN cmake -B build && cmake --build build |
|
|
| |
| WORKDIR /app |
| COPY app.py requirements.txt ./ |
|
|
| |
| RUN chmod -R 777 /app |
|
|
| |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN mkdir -p /app/model && \ |
| wget -O /app/model/model.gguf \ |
| "https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/resolve/main/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf" |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "app.py"] |