FROM ghcr.io/ggml-org/llama.cpp:full WORKDIR /app # Python仮想環境を作るための最低限のものを入れる RUN apt-get update && apt-get install -y --no-install-recommends \ python3-pip python3-venv \ && rm -rf /var/lib/apt/lists/* # venv を作成 RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" # venv にだけ pip パッケージを入れる RUN pip install --no-cache-dir -U huggingface_hub # モデルとmmprojをダウンロード RUN python3 -c 'from huggingface_hub import hf_hub_download; \ repo="yuxinlu1/gemma-4-12B-coder-fable5-composer2.5-v1-GGUF"; \ hf_hub_download(repo_id=repo, filename="gemma4-coding-Q2_K.gguf", local_dir="/app")' CMD ["--server", \ "-m", "gemma4-coding-Q2_K.gguf", \ "--host", "0.0.0.0", \ "--port", "7860", \ "-t", "3", \ "--mlock", \ "--prio", "3", \ "--swa-full", \ "--no-slots", \ "--mmap", \ "--log-disable", \ "--no-cont-batching", \ "--threads-http", "1", \ "--direct-io", \ "--no-repack", \ "--temp 0.2 --top-k 64 --top-p 0.95 --repeat-penalty 1.08 #custom-gemma-4-12B-coder-fable5-composoer-2.5-v.1:gguf;by-https://huggingface.co/spaces/cl4ude/fable5/blob/main/app.py", \ "--flash-attn", "off", \ "-c", "64000", \ "-n", "38912"]