m64_1828c9db76c6 / Dockerfile
63 lines, 4.0 KBraw
1# dsh-qwen38fn-llamacpp-gb10: DeepSeek Harness 0.2.0-rc.2 (deepseek-ai/deepseek-harness) driving Qwen3.8-Flash-Next IQ3_S, served by stock2# llama.cpp v1.0.0 (llama-server, CUDA 13, built for the GB10's sm_121) in the same container at the model's3# full 262144-token window. The engine part is the qwen38-flash-next-llamacpp-gb10 capsule's Dockerfile4# (build stage line for line); then the agent's tools, Node 22 and the harness, as dsh-qwen38fn-strata-gb105# installs them.6#7# Build stage: NVIDIA's PyTorch 25.x container (Ubuntu 24.04, CUDA 13.0, nvcc with compute_121, cmake 3.31),8# pinned by digest; only its toolchain is used. The source is the v1.0.0 tag's commit, checked by SHA-256.9FROM nvcr.io/nvidia/pytorch@sha256:f3b4a33fd60d5e0358287bb44d57e91eda45e8f1681fef1bfd6c969371417130 AS build10ARG LLAMA_COMMIT=a6d1a74dbebce3a16f4f2ceddbf38c21a08d867411ARG LLAMA_SHA256=5f2e8db8f5ddac1582bc702c0c22b59f1795a7e6de8387c3db22e5840725665b12RUN set -e; cd /tmp; \13 curl -fsSL -o src.tgz "https://github.com/ggml-org/llama.cpp/archive/$LLAMA_COMMIT.tar.gz"; \14 echo "$LLAMA_SHA256 src.tgz" | sha256sum -c -; \15 tar xzf src.tgz; mv "llama.cpp-$LLAMA_COMMIT" /src; rm src.tgz16WORKDIR /src17RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \18 -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=121 -DGGML_NATIVE=OFF -DGGML_CUDA_NCCL=OFF \19 -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF \20 -DLLAMA_BUILD_UI=OFF -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_OPENSSL=OFF \21 && cmake --build build --config Release -j"$(nproc)" --target llama-server \22 && mkdir -p /out/bin /out/lib \23 && cp build/bin/llama-server /out/bin/ \24 && cp -a /usr/local/cuda/lib64/libcudart.so.13* /usr/local/cuda/lib64/libcublas.so.13* \25 /usr/local/cuda/lib64/libcublasLt.so.13* /out/lib/ \26 && cp LICENSE /out/LICENSE.llama.cpp2728# Runtime: ubuntu:24.04 (arm64), pinned by digest, with the server and the three CUDA libraries it links.29FROM ubuntu@sha256:c92376659a7f14cc1f51615d73c9f4b7d8e18d59f370e02b4ed683ab4485c66c30ENV DEBIAN_FRONTEND=noninteractive31RUN apt-get update \32 && apt-get install -y --no-install-recommends ca-certificates curl libgomp1 \33 && rm -rf /var/lib/apt/lists/* /var/cache/apt/*34COPY --from=build /out/bin/llama-server /opt/llama/bin/llama-server35COPY --from=build /out/lib/ /opt/llama/lib/36COPY --from=build /out/LICENSE.llama.cpp /opt/llama/37ENV LD_LIBRARY_PATH=/opt/llama/lib PYTHONUNBUFFERED=1 LANG=C.UTF-8 \38 NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=compute,utility39# Every library resolves except libcuda.so.1, which the NVIDIA runtime mounts from the driver at start.40RUN ! ldd /opt/llama/bin/llama-server | grep 'not found' | grep -v 'libcuda\.so\.1'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 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 arm64 build,48# checked against nodejs.org's SHASUMS256.txt.49RUN curl -fsSL https://nodejs.org/dist/v22.23.2/node-v22.23.2-linux-arm64.tar.xz -o /tmp/node.tar.xz \50 && echo "fff4078c5def658577f92c88db7db3bc0072924bfb93fe52c1e744a54e94abb8 /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 @deepseek-ai/dsh@0.2.0-rc.2 && npm cache clean --force5657# Gateway deps, the same pinned set as the other agent capsules' gateways.58RUN python3 -m venv /opt/gateway && /opt/gateway/bin/pip install --no-cache-dir \59 fastapi==0.115.14 uvicorn==0.32.1 httpx==0.28.1 \60 starlette==0.46.2 pydantic==2.14.1 pydantic_core==2.50.1 annotated-types==0.8.0 \61 typing_extensions==4.16.0 typing-inspection==0.4.4 anyio==4.15.1 idna==3.20 \62 certifi==2026.10.23 httpcore==1.0.9 h11==0.16.0 click==8.5.063WORKDIR /scratch