m64_16e0a972a5c7 / Dockerfile
38 lines, 3.0 KBraw
1# hermes-gemma4-gb10: Hermes Agent v2026.9.21 (NousResearch) driving Gemma 4 26B-A4B NVFP4 served by vLLM in the same container.2# Port of gx10 start_hermes_gemma4.sh (agents/hermes/Dockerfile + the agents/sandbox.sh3# gemma4-26b profile). The vLLM part is the gemma4-26b-a4b-nvfp4-gb10 capsule's image.4# Base: vllm/vllm-openai:gemma4-cu130 (vLLM 0.19.1), the image gx10's start_gemma4.sh runs,5# pinned by its multi-arch index digest.6FROM vllm/vllm-openai@sha256:0d152595cd940ea1e0890fa190a37b7a86e3f7f0f5048ac3e2e4c14529fea8337# gx10's script mounts the checkpoint's gemma4_patched.py over vLLM's gemma4.py: it fixes the8# NVFP4 scale-key mapping in FusedMoE. Same file, taken from the pinned revision of the weights9# repo and checked by sha256, installed at build time (the capsule runs as nobody).10RUN python3 -c "import urllib.request as u; u.urlretrieve('https://huggingface.co/bg-digitalservices/Gemma-4-26B-A4B-it-NVFP4/resolve/a15dd6f161881b62db952303a5bfb7be118ed15e/gemma4_patched.py', '/tmp/gemma4_patched.py')" \11 && echo '26d4748c74de9e24a5600e19c53e671ff0d0e5d6143f29c8c54b679e4f455977 /tmp/gemma4_patched.py' | sha256sum -c - \12 && mv /tmp/gemma4_patched.py /usr/local/lib/python3.12/dist-packages/vllm/model_executor/models/gemma4.py1314# The agent's tools (as gx10's agent images: git, ripgrep, jq, a C toolchain...).15RUN apt-get update -qq && apt-get install -y --no-install-recommends \16 ca-certificates git ripgrep jq curl xz-utils unzip file less procps build-essential python3-venv \17 && rm -rf /var/lib/apt/lists/*1819# Node 22.23.2 (the version of the node:22 image gx10's agents use), official arm64 build,20# checked against nodejs.org's SHASUMS256.txt.21RUN curl -fsSL https://nodejs.org/dist/v22.23.2/node-v22.23.2-linux-arm64.tar.xz -o /tmp/node.tar.xz \22 && echo "fff4078c5def658577f92c88db7db3bc0072924bfb93fe52c1e744a54e94abb8 /tmp/node.tar.xz" | sha256sum -c - \23 && mkdir -p /opt/node && tar xJf /tmp/node.tar.xz -C /opt/node --strip-components=1 && rm /tmp/node.tar.xz \24 && ln -s /opt/node/bin/node /opt/node/bin/npm /opt/node/bin/npx /usr/local/bin/25ENV PATH=/opt/node/bin:$PATH2627# Hermes's own installer, taken from the pinned commit (the v2026.9.21 tag) and checked by28# sha256, then told to check out that same commit. It provisions a sha256-pinned uv and29# installs Python deps from the repo's lock (pm/lock.json). As root it puts the code in30# /usr/local/lib/hermes-agent and links `hermes` into /usr/local/bin. The browser and31# computer-use stacks are skipped (gigabytes, and the sandbox has no display).32ARG HERMES_COMMIT=d337b736aa1e8ebecfab043842d13e4a2d2f48a333RUN curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HERMES_COMMIT}/scripts/install.sh" -o /tmp/install.sh \34 && echo "00f9080c6452bf87f03ef2fffb4b2c23b9f43f946aaae956e4c547d17e310b22 /tmp/install.sh" | sha256sum -c - \35 && bash /tmp/install.sh --branch main --commit "${HERMES_COMMIT}" \36 --non-interactive --skip-setup --skip-browser --skip-computer-use \37 && rm -f /tmp/install.sh \38 && hermes --version