# opencode-qwen38fn-strata-gb10: opencode 1.18.23 (sst/opencode) driving Qwen3.8-Flash-Next IQ3_S, served by # Strata 0.2.13's DGX Spark engine in the same container at the model's full 262144-token window. # The engine part is the qwen38-flash-next-strata-gb10 capsule's Dockerfile, line for line (Strata 0.2.15, the # latest release, still ships the same linux-aarch64 control 0.1.59 and engine 0.1.59); then the agent's tools, # Node 22 and opencode, as the other opencode capsules (opencode-qwen38-gb10) install them. # # Engine: Strata 0.2.13 (github.com/Niko1221/Strata, MIT) for the DGX Spark's GB10 # (linux-aarch64, sm_121), the same parts Strata's own runtime image (docker/Dockerfile) holds, from the # release's linux-aarch64 packages instead of the x86-64 ones: # - the Terminal (strata-control 0.1.59: `strata launch`, setup.py and its tools, its own Python 3.12), # - the CUDA 13 engine package (strata-engine 0.1.59, sm_121, built by Strata's spark/build_engine.sh), # - llama.cpp's gguf-py at the commit setup.py pins (it prepares the model's pack at start), # - Qwen3.8-Flash-Next's MTP draft layer, which Strata does not ship as a file: tools/mtp_fetch.py reads only # the ~5 GB of mtp.* tensors out of Qwen/Qwen3.8-Flash-Next at the revision Strata pins, by HTTP range # requests, and checks every tensor against Strata's pinned SHA-256; mtp_pack.py and mtp_rt.py then make # the 0.8 GB runtime form, exactly as setup.py does. The raw tensors are removed (Strata re-verifies them # only when they are there). # Base: ubuntu:24.04 (glibc 2.39, which the engine package needs), arm64, pinned by digest. FROM ubuntu@sha256:c92376659a7f14cc1f51615d73c9f4b7d8e18d59f370e02b4ed683ab4485c66c ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl libgomp1 libatomic1 libnuma1 zlib1g \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* # The release packages, checked against the release's SHA256SUMS.txt (v0.2.13). ARG REL=https://github.com/Niko1221/Strata/releases/download/v0.2.13 RUN set -e; mkdir -p /opt/strata/terminal /opt/strata/components/engine/0.1.59-linux-aarch64-cuda-cuda13; cd /tmp; \ curl -fsSL -o control.tgz "$REL/strata-control-0.1.59-linux-aarch64.tar.gz"; \ curl -fsSL -o engine.tgz "$REL/strata-engine-0.1.59-linux-aarch64-cuda-cuda13.tar.gz"; \ printf '%s %s\n' \ 1579f7c6490e52334ca2d134b81534e6a5a351247a506918cbfd1f8285114523 control.tgz \ b213d9b173aae99645fc5922d42276fa1ed17ac67f7b788c55c912ba49e148f1 engine.tgz | sha256sum -c -; \ tar xzf control.tgz -C /opt/strata/terminal; \ tar xzf engine.tgz -C /opt/strata/components/engine/0.1.59-linux-aarch64-cuda-cuda13; \ rm control.tgz engine.tgz; \ /opt/strata/terminal/bin/strata --version ENV PY=/opt/strata/terminal/python/bin/python3 PYTHONNOUSERSITE=1 LANG=C.UTF-8 # llama.cpp at setup.py's pinned commit (3cf0325); only gguf-py and the marker file setup.py looks for are kept, # as in Strata's image. RUN cd /opt/strata/terminal && STRATA_CONTROL_INSTALL=1 STRATA_INSTALL_DIR=/opt/strata/seed $PY -c "import setup; print(setup.get_llama_cpp())" \ && rm -rf /opt/strata/seed/third_party/*.zip* \ && cd /opt/strata/seed/third_party/llama.cpp \ && find . -mindepth 1 -maxdepth 1 ! -name gguf-py ! -name ggml ! -name 'LICENSE*' -exec rm -rf {} + \ && find ggml -mindepth 1 -depth ! -type d ! -name CMakeLists.txt -delete && find ggml -mindepth 1 -type d -empty -delete # The MTP draft layer (see the header), as setup.py makes it. RUN set -e; cd /opt/strata/terminal; M=/opt/strata/mtp; \ export STRATA_CONTROL_INSTALL=1 STRATA_INSTALL_DIR=/opt/strata/seed; \ $PY tools/mtp_fetch.py fetch --out $M; \ $PY tools/mtp_fetch.py verify --out $M; \ $PY tools/mtp_pack.py --src $M --experts q2_0 --out $M/mtp-q2_0.gguf; \ $PY tools/mtp_rt.py --gguf $M/mtp-q2_0.gguf --out $M/rt; \ rm -rf $M/tensors; test -f $M/rt/experts.bin; du -sh $M ENV STRATA_COMPONENTS_DIR=/opt/strata/components STRATA_IN_DOCKER=1 PYTHONUNBUFFERED=1 \ NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=compute,utility # 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 opencode-ai@1.18.23 && npm cache clean --force # Everything opencode would otherwise fetch at run time (models.dev catalogue, LSP servers, # self-update) is disabled. The npm packages it installs on a project's first use are # warmed here, where the build has network (warm_opencode.sh); start.sh copies them into # the throwaway HOME. ENV OPENCODE_DISABLE_AUTOUPDATE=1 \ OPENCODE_DISABLE_LSP_DOWNLOAD=1 \ OPENCODE_DISABLE_MODELS_FETCH=1 \ OPENCODE_DISABLE_SHARE=1 COPY opencode.json /etc/opencode/opencode.json COPY warm_opencode.sh /tmp/warm_opencode.sh RUN bash /tmp/warm_opencode.sh && rm /tmp/warm_opencode.sh # 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