Download Dockerfile from reikernx/cobuild: direct link, hf CLI and curl.
- Browser
- Download file 929 Bytes
-
https://huggingface.co/spaces/reikernx/cobuild/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/reikernx/cobuild/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/reikernx/cobuild/resolve/main/Dockerfile
929 Bytes
| # Use slim Python base | |
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && \ | |
| apt-get install -y git build-essential cmake wget curl && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Clone llama.cpp | |
| RUN git clone https://github.com/ggml-org/llama.cpp.git /llama.cpp | |
| WORKDIR /llama.cpp | |
| # Build llama.cpp using CMake | |
| RUN cmake -B build && cmake --build build | |
| # Switch to app folder | |
| WORKDIR /app | |
| COPY app.py requirements.txt ./ | |
| # Make /app fully readable/writable/executable | |
| RUN chmod -R 777 /app | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download GGUF model at build time (replace with your GitHub/HF link) | |
| 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 port for Gradio | |
| EXPOSE 7860 | |
| # Start app | |
| CMD ["python", "app.py"] |