m64_bc63e0883ee5 / Dockerfile
64 lines, 3.9 KBraw
1# pi17-qwen4-35b-a3b-q6xl-mtp-strixhalo: pi coding agent 1.7.0 (earendil-works/pi) with stock llama.cpp master dd6b0fa2# (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 pi17-*-strixhalo Dockerfile with the llama.cpp of4# opencode-qwen4-35b-a3b-q6xl-mtp-strixhalo (master dd6b0fa, after #33626 "model: qwen4"), built the same way, so the5# two capsules differ only in the harness.6#7# Build stage: ubuntu:26.04 (Vulkan and SPIR-V headers, glslc, cmake from the archive), pinned by digest. The source is8# master's commit dd6b0fa (2026-12-04), checked by SHA-256.9FROM ubuntu@sha256:2431ef40ba297198424288808116592542a461063c4abe97e2bbe048582b8d49 AS build10ENV DEBIAN_FRONTEND=noninteractive11RUN apt-get update \12 && apt-get install -y --no-install-recommends ca-certificates curl build-essential cmake libvulkan-dev glslc spirv-headers \13 && rm -rf /var/lib/apt/lists/*14ARG LLAMA_COMMIT=dd6b0fadf77357ac8ddd51b597ae72322e8237b115ARG LLAMA_SHA256=6e0b857a3d5e3612d96b38bd8965c3cc9f84ac428101b74263db0791ac26adf416RUN set -e; cd /tmp; \17 curl -fsSL -o src.tgz "https://github.com/ggml-org/llama.cpp/archive/$LLAMA_COMMIT.tar.gz"; \18 echo "$LLAMA_SHA256 src.tgz" | sha256sum -c -; \19 tar xzf src.tgz; mv "llama.cpp-$LLAMA_COMMIT" /src; rm src.tgz20WORKDIR /src21RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \22 -DGGML_VULKAN=ON -DGGML_NATIVE=OFF \23 -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF \24 -DLLAMA_BUILD_UI=OFF -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_OPENSSL=OFF \25 && cmake --build build --config Release -j"$(nproc)" --target llama-server llama-bench \26 && mkdir -p /out/bin \27 && cp build/bin/llama-server build/bin/llama-bench /out/bin/ \28 && cp LICENSE /out/LICENSE.llama.cpp2930# Runtime: ubuntu:26.04 (amd64), pinned by digest, with Mesa's Vulkan drivers (RADV) and the loader.31# The GPU reaches the container as /dev/dri (render node); no ROCm and no /dev/kfd are needed.32FROM ubuntu@sha256:2431ef40ba297198424288808116592542a461063c4abe97e2bbe048582b8d4933ENV DEBIAN_FRONTEND=noninteractive34RUN apt-get update \35 && apt-get install -y --no-install-recommends ca-certificates curl libgomp1 libvulkan1 mesa-vulkan-drivers python3 \36 && rm -rf /var/lib/apt/lists/* /var/cache/apt/*37COPY --from=build /out/bin/ /opt/llama/bin/38COPY --from=build /out/LICENSE.llama.cpp /opt/llama/39ENV PYTHONUNBUFFERED=1 LANG=C.UTF-8 AMD_VULKAN_ICD=RADV40RUN ! ldd /opt/llama/bin/llama-server | grep 'not found'4142# The agent's tools (as gx10's agent images: git, ripgrep, jq, a C toolchain, Python 3).43RUN apt-get update -qq && apt-get install -y --no-install-recommends \44 git ripgrep jq xz-utils unzip file less procps build-essential python3-venv \45 && rm -rf /var/lib/apt/lists/*4647# Node 22.23.2 (the version of the node:22 image gx10's agents use), official x64 build,48# checked against nodejs.org's SHASUMS256.txt.49RUN curl -fsSL https://nodejs.org/dist/v22.23.2/node-v22.23.2-linux-x64.tar.xz -o /tmp/node.tar.xz \50 && echo "d60acfe00a2932254bb0ad20e01b0d74397a0875595de719654b214f4b03f307 /tmp/node.tar.xz" | sha256sum -c - \51 && mkdir -p /opt/node && tar xJf /tmp/node.tar.xz -C /opt/node --strip-components=1 && rm /tmp/node.tar.xz \52 && ln -s /opt/node/bin/node /opt/node/bin/npm /opt/node/bin/npx /usr/local/bin/53ENV PATH=/opt/node/bin:$PATH5455RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.7.0 && npm cache clean --force56ENV PI_OFFLINE=1 PI_TELEMETRY=05758# Gateway deps, the same pinned set as the other agent capsules' gateways.59RUN python3 -m venv /opt/gateway && /opt/gateway/bin/pip install --no-cache-dir \60 fastapi==0.115.14 uvicorn==0.32.1 httpx==0.28.1 \61 starlette==0.46.2 pydantic==2.14.1 pydantic_core==2.50.1 annotated-types==0.8.0 \62 typing_extensions==4.16.0 typing-inspection==0.4.4 anyio==4.15.1 idna==3.20 \63 certifi==2026.10.23 httpcore==1.0.9 h11==0.16.0 click==8.5.064WORKDIR /scratch