trytry / Dockerfile
proti0070's picture
Update Dockerfile
e7a1edc verified
Raw
History Blame Contribute Delete
897 Bytes
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
build-essential cmake git wget \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth=1 https://github.com/ggerganov/llama.cpp /app/llama.cpp
WORKDIR /app/llama.cpp
RUN cmake -B build \
-DLLAMA_CURL=OFF \
-DLLAMA_BUILD_TESTS=OFF \
-DLLAMA_BUILD_EXAMPLES=OFF \
-DLLAMA_BUILD_SERVER=ON \
-DGGML_BACKEND_DL=OFF \
-DLLAMA_BUILD_COMMON=OFF \
&& cmake --build build --target llama-server -j$(nproc)
RUN mkdir -p /app/models && \
wget -q -O /app/models/qwen3-4b.gguf \
"https://huggingface.co/bartowski/Qwen3-4B-GGUF/resolve/main/Qwen3-4B-Q4_K_M.gguf"
EXPOSE 7860
CMD ["/app/llama.cpp/build/bin/llama-server", \
"--model", "/app/models/qwen3-4b.gguf", \
"--host", "0.0.0.0", \
"--port", "7860", \
"--ctx-size", "4096", \
"--threads", "4", \
"--n-predict", "512"]