motif64

m64_2fff2136be86 / Dockerfile

64 lines, 3.9 KBraw
1# pi-qwen36-35b-a3b-llamacpp-strixhalo: pi coding agent 0.73.1 (badlogic/pi-mono) driving Qwen3.6-35B-A3B UD-Q4_K_XL,2# served by stock llama.cpp v1.0.0 (llama-server, built with the Vulkan backend, run on Mesa RADV) in the same container,3# for AMD Strix Halo (Ryzen AI MAX+ 395, Radeon 8060S, gfx1151) on linux-x86_64. The engine part is the4# qwen36-35b-a3b-llamacpp-strixhalo capsule's Dockerfile (both stages line for line); then the agent's tools, Node 225# and the harness, as pi-qwen38fn-llamacpp-gb10 installs them.6#7# Build stage: ubuntu:26.04 (Vulkan and SPIR-V headers, glslc, cmake from the archive), pinned by digest. The source is8# the v1.0.0 tag's commit, 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=a6d1a74dbebce3a16f4f2ceddbf38c21a08d867415ARG LLAMA_SHA256=5f2e8db8f5ddac1582bc702c0c22b59f1795a7e6de8387c3db22e5840725665b16RUN 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 \26 && mkdir -p /out/bin \27 && cp build/bin/llama-server /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/llama-server /opt/llama/bin/llama-server38COPY --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 @mariozechner/pi-coding-agent@0.73.1 && 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