m64_1c59141d6157 / Dockerfile
65 lines, 4.0 KBraw
1# pi17-*-strixhalo: pi coding agent 1.7.0 (earendil-works/pi) with stock llama.cpp master 75d911f (2026-12-03,2# llama-server and llama-bench built with the Vulkan backend, run on Mesa RADV) in one container, for AMD Strix Halo3# (Ryzen AI MAX+ 395, Radeon 8060S, gfx1151) on linux-x86_64. The same Dockerfile in every pi17-*-strixhalo capsule,4# so they share one image; it is pi-qwen36-35b-a3b-llamacpp-strixhalo's Dockerfile with a newer llama.cpp (Vulkan5# MoE, mul_mat_vecq and SSM_SCAN speed-ups, Inkling 2 inkling2_loop support) and pi 1.7.0, the pi the Inkling6# adapter was trained with.7#8# Build stage: ubuntu:26.04 (Vulkan and SPIR-V headers, glslc, cmake from the archive), pinned by digest. The source is9# master's commit 75d911f, checked by SHA-256.10FROM ubuntu@sha256:2431ef40ba297198424288808116592542a461063c4abe97e2bbe048582b8d49 AS build11ENV DEBIAN_FRONTEND=noninteractive12RUN apt-get update \13 && apt-get install -y --no-install-recommends ca-certificates curl build-essential cmake libvulkan-dev glslc spirv-headers \14 && rm -rf /var/lib/apt/lists/*15ARG LLAMA_COMMIT=75d911fff3e880fda4d5eadb3bba22bcebbb729316ARG LLAMA_SHA256=ea40770ea12fc45ce9150fa2bb5526931ad45237a30ddef8ba4fad577bd36e5817RUN set -e; cd /tmp; \18 curl -fsSL -o src.tgz "https://github.com/ggml-org/llama.cpp/archive/$LLAMA_COMMIT.tar.gz"; \19 echo "$LLAMA_SHA256 src.tgz" | sha256sum -c -; \20 tar xzf src.tgz; mv "llama.cpp-$LLAMA_COMMIT" /src; rm src.tgz21WORKDIR /src22RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \23 -DGGML_VULKAN=ON -DGGML_NATIVE=OFF \24 -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF \25 -DLLAMA_BUILD_UI=OFF -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_OPENSSL=OFF \26 && cmake --build build --config Release -j"$(nproc)" --target llama-server llama-bench \27 && mkdir -p /out/bin \28 && cp build/bin/llama-server build/bin/llama-bench /out/bin/ \29 && cp LICENSE /out/LICENSE.llama.cpp3031# Runtime: ubuntu:26.04 (amd64), pinned by digest, with Mesa's Vulkan drivers (RADV) and the loader.32# The GPU reaches the container as /dev/dri (render node); no ROCm and no /dev/kfd are needed.33FROM ubuntu@sha256:2431ef40ba297198424288808116592542a461063c4abe97e2bbe048582b8d4934ENV DEBIAN_FRONTEND=noninteractive35RUN apt-get update \36 && apt-get install -y --no-install-recommends ca-certificates curl libgomp1 libvulkan1 mesa-vulkan-drivers python3 \37 && rm -rf /var/lib/apt/lists/* /var/cache/apt/*38COPY --from=build /out/bin/ /opt/llama/bin/39COPY --from=build /out/LICENSE.llama.cpp /opt/llama/40ENV PYTHONUNBUFFERED=1 LANG=C.UTF-8 AMD_VULKAN_ICD=RADV41RUN ! ldd /opt/llama/bin/llama-server | grep 'not found'4243# The agent's tools (as gx10's agent images: git, ripgrep, jq, a C toolchain, Python 3).44RUN apt-get update -qq && apt-get install -y --no-install-recommends \45 git ripgrep jq xz-utils unzip file less procps build-essential python3-venv \46 && rm -rf /var/lib/apt/lists/*4748# Node 22.23.2 (the version of the node:22 image gx10's agents use), official x64 build,49# checked against nodejs.org's SHASUMS256.txt.50RUN curl -fsSL https://nodejs.org/dist/v22.23.2/node-v22.23.2-linux-x64.tar.xz -o /tmp/node.tar.xz \51 && echo "d60acfe00a2932254bb0ad20e01b0d74397a0875595de719654b214f4b03f307 /tmp/node.tar.xz" | sha256sum -c - \52 && mkdir -p /opt/node && tar xJf /tmp/node.tar.xz -C /opt/node --strip-components=1 && rm /tmp/node.tar.xz \53 && ln -s /opt/node/bin/node /opt/node/bin/npm /opt/node/bin/npx /usr/local/bin/54ENV PATH=/opt/node/bin:$PATH5556RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.7.0 && npm cache clean --force57ENV PI_OFFLINE=1 PI_TELEMETRY=05859# Gateway deps, the same pinned set as the other agent capsules' gateways.60RUN python3 -m venv /opt/gateway && /opt/gateway/bin/pip install --no-cache-dir \61 fastapi==0.115.14 uvicorn==0.32.1 httpx==0.28.1 \62 starlette==0.46.2 pydantic==2.14.1 pydantic_core==2.50.1 annotated-types==0.8.0 \63 typing_extensions==4.16.0 typing-inspection==0.4.4 anyio==4.15.1 idna==3.20 \64 certifi==2026.10.23 httpcore==1.0.9 h11==0.16.0 click==8.5.065WORKDIR /scratch