File size: 742 Bytes
b560366
04c2c48
 
b560366
04c2c48
b560366
04c2c48
75e0d57
b560366
 
 
04c2c48
b560366
04c2c48
 
 
75e0d57
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 1. Use the official llama.cpp server image
FROM ghcr.io/ggml-org/llama.cpp:server

# 2. Switch to root to install wget
USER root
RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*

# 3. Download the model (7GB)
RUN wget -q --show-progress --progress=dot:giga \
    https://huggingface.co/nocturne23/gemma-3-12b-it-Q4_K_M-GGUF/resolve/main/gemma-3-12b-it-q4_k_m.gguf \
    -O /model.gguf

# 4. Set the port
ENV PORT=7860
EXPOSE 7860

# 5. Start the server using 'sh -c' to find the executable
# This will search for the llama-server file wherever it is located
ENTRYPOINT ["sh", "-c", "$(find / -name llama-server -type f -executable | head -n 1) --host 0.0.0.0 --port 7860 -m /model.gguf -c 2048 --api-key no-key"]