ga / Dockerfile
ShadowHunter222's picture
Update Dockerfile
d57abe3 verified
Raw History Blame Contribute Delete
1.18 kB
FROM ghcr.io/ggml-org/llama.cpp:server
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
OMP_NUM_THREADS=2 \
MODELS_DIR=/models \
DATA_DIR=/data \
LLAMA_REPO=bartowski/Llama-3.2-1B-Instruct-GGUF \
LLAMA_FILE=Llama-3.2-1B-Instruct-Q4_K_M.gguf \
THREADS=2
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip curl wget ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN mkdir -p /models && \
pip3 install --no-cache-dir --break-system-packages "huggingface_hub>=0.34.0" && \
(hf download "$LLAMA_REPO" "$LLAMA_FILE" --local-dir /models \
|| huggingface-cli download "$LLAMA_REPO" "$LLAMA_FILE" --local-dir /models) && \
ls -lh /models
RUN mkdir -p /data/jobs
EXPOSE 7860
ENTRYPOINT ["/app/llama-server"]
CMD ["-m", "/models/Llama-3.2-1B-Instruct-Q4_K_M.gguf", \
"--host", "0.0.0.0", "--port", "7860", \
"-c", "4096", "-b", "512", "-ub", "128", \
"-t", "2", "--threads-batch", "2", "--parallel", "1", \
"--cache-type-k", "q8_0", "--cache-type-v", "q8_0", \
"--flash-attn", "on", "--jinja", \
"--temp", "0.0", "--metrics"]