# dsh-qwen38fn-llamacpp-gb10: DeepSeek Harness 0.2.0-rc.2 (deepseek-ai/deepseek-harness) driving Qwen3.8-Flash-Next IQ3_S, served by stock # llama.cpp v1.0.0 (llama-server, CUDA 13, built for the GB10's sm_121) in the same container at the model's # full 262144-token window. The engine part is the qwen38-flash-next-llamacpp-gb10 capsule's Dockerfile # (build stage line for line); then the agent's tools, Node 22 and the harness, as dsh-qwen38fn-strata-gb10 # installs them. # # Build stage: NVIDIA's PyTorch 25.x container (Ubuntu 24.04, CUDA 13.0, nvcc with compute_121, cmake 3.31), # pinned by digest; only its toolchain is used. The source is the v1.0.0 tag's commit, checked by SHA-256. FROM nvcr.io/nvidia/pytorch@sha256:f3b4a33fd60d5e0358287bb44d57e91eda45e8f1681fef1bfd6c969371417130 AS build ARG LLAMA_COMMIT=a6d1a74dbebce3a16f4f2ceddbf38c21a08d8674 ARG LLAMA_SHA256=5f2e8db8f5ddac1582bc702c0c22b59f1795a7e6de8387c3db22e5840725665b RUN set -e; cd /tmp; \ curl -fsSL -o src.tgz "https://github.com/ggml-org/llama.cpp/archive/$LLAMA_COMMIT.tar.gz"; \ echo "$LLAMA_SHA256 src.tgz" | sha256sum -c -; \ tar xzf src.tgz; mv "llama.cpp-$LLAMA_COMMIT" /src; rm src.tgz WORKDIR /src RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \ -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=121 -DGGML_NATIVE=OFF -DGGML_CUDA_NCCL=OFF \ -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF \ -DLLAMA_BUILD_UI=OFF -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_OPENSSL=OFF \ && cmake --build build --config Release -j"$(nproc)" --target llama-server \ && mkdir -p /out/bin /out/lib \ && cp build/bin/llama-server /out/bin/ \ && cp -a /usr/local/cuda/lib64/libcudart.so.13* /usr/local/cuda/lib64/libcublas.so.13* \ /usr/local/cuda/lib64/libcublasLt.so.13* /out/lib/ \ && cp LICENSE /out/LICENSE.llama.cpp # Runtime: ubuntu:24.04 (arm64), pinned by digest, with the server and the three CUDA libraries it links. FROM ubuntu@sha256:c92376659a7f14cc1f51615d73c9f4b7d8e18d59f370e02b4ed683ab4485c66c ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl libgomp1 \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* COPY --from=build /out/bin/llama-server /opt/llama/bin/llama-server COPY --from=build /out/lib/ /opt/llama/lib/ COPY --from=build /out/LICENSE.llama.cpp /opt/llama/ ENV LD_LIBRARY_PATH=/opt/llama/lib PYTHONUNBUFFERED=1 LANG=C.UTF-8 \ NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=compute,utility # Every library resolves except libcuda.so.1, which the NVIDIA runtime mounts from the driver at start. RUN ! ldd /opt/llama/bin/llama-server | grep 'not found' | grep -v 'libcuda\.so\.1' # The agent's tools (as gx10's agent images: git, ripgrep, jq, a C toolchain, Python 3). RUN apt-get update -qq && apt-get install -y --no-install-recommends \ git ripgrep jq xz-utils unzip file less procps build-essential python3 python3-venv \ && rm -rf /var/lib/apt/lists/* # Node 22.23.2 (the version of the node:22 image gx10's agents use), official arm64 build, # checked against nodejs.org's SHASUMS256.txt. RUN curl -fsSL https://nodejs.org/dist/v22.23.2/node-v22.23.2-linux-arm64.tar.xz -o /tmp/node.tar.xz \ && echo "fff4078c5def658577f92c88db7db3bc0072924bfb93fe52c1e744a54e94abb8 /tmp/node.tar.xz" | sha256sum -c - \ && mkdir -p /opt/node && tar xJf /tmp/node.tar.xz -C /opt/node --strip-components=1 && rm /tmp/node.tar.xz \ && ln -s /opt/node/bin/node /opt/node/bin/npm /opt/node/bin/npx /usr/local/bin/ ENV PATH=/opt/node/bin:$PATH RUN npm install -g @deepseek-ai/dsh@0.2.0-rc.2 && npm cache clean --force # Gateway deps, the same pinned set as the other agent capsules' gateways. RUN python3 -m venv /opt/gateway && /opt/gateway/bin/pip install --no-cache-dir \ fastapi==0.115.14 uvicorn==0.32.1 httpx==0.28.1 \ starlette==0.46.2 pydantic==2.14.1 pydantic_core==2.50.1 annotated-types==0.8.0 \ typing_extensions==4.16.0 typing-inspection==0.4.4 anyio==4.15.1 idna==3.20 \ certifi==2026.10.23 httpcore==1.0.9 h11==0.16.0 click==8.5.0 WORKDIR /scratch