Skip to content

Latest commit

 

History

History
456 lines (357 loc) · 35.7 KB

DOCKER.md

File metadata and controls

456 lines (357 loc) · 35.7 KB

Strata in Docker

Run Strata in a container with a prebuilt engine. Install Docker, the host GPU driver and the GPU-access requirements in the table below. NVIDIA and AMD images can download and prepare a model on first start; Intel Arc needs prepared model files. Keep the data volume to reuse downloads and settings.

On this page: Which image · One command per card · Docker Compose · Settings · The API key · Connect your apps · Watch and stop · Update · Troubleshooting · Podman · From the older image · Build it yourself

Docker on a Mac has no access to the Mac's graphics chip (no Metal): use the Mac app or the Terminal (MAC.md, TERMINAL_LAUNCH.md). Docker Desktop on Windows passes NVIDIA cards through (WSL 2) but not Radeon or Arc cards; on Windows use the native app for supported NVIDIA or AMD cards. Intel Arc has no native Windows engine; follow the Linux guide.

Which image for which card

Your graphics card Image tag Needs on the computer
NVIDIA RTX 20, 30, 40, 50 series (and the matching RTX A / Quadro cards) 0.2.20-cuda13 NVIDIA driver 580 or newer, NVIDIA Container Toolkit
NVIDIA GTX 10 (Pascal), Tesla P100, V100 (Volta), or any NVIDIA card whose driver is 575 to 579 0.2.20-cuda12 NVIDIA driver 575 or newer, the same toolkit
AMD RX 9000 series and Radeon AI PRO R9700 (RDNA 4, gfx1200 / gfx1201) 0.2.20-rocm-gfx120x the amdgpu kernel driver (Linux 6.8+)
AMD RX 7000 series (RDNA 3, gfx1100 / gfx1101 / gfx1102) 0.2.20-rocm-gfx110x the amdgpu kernel driver
AMD Ryzen AI Max ("Strix Halo", Radeon 8060S, gfx1151) 0.2.20-rocm-gfx1151 the amdgpu kernel driver
AMD Ryzen AI 300 / 7040 / 8040 (Radeon 890M / 880M / 780M, gfx1150 / gfx1103) 0.2.20-rocm-igpu (when published for a release, else build it) the amdgpu kernel driver
Intel Arc A-series and B-series (including Arc Pro B70) 0.2.20-sycl (if no image exists for a release, build it) the i915 or xe kernel driver; prepared model files (see Intel)

Measured on: the 0.2.16 images (engine 0.1.62), pulled with Podman. Size on disk: cuda13 1.32 GB, cuda12 1.65 GB, rocm-gfx120x 2.73 GB, rocm-gfx110x 1.6 GB, rocm-gfx1151 1.48 GB, sycl 1.47 GB. The download is smaller (the layers are compressed): cuda13 713 MB, cuda12 904 MB, rocm-gfx120x 778 MB, rocm-gfx110x 415 MB, rocm-gfx1151 408 MB, sycl 446 MB. The model comes on top, on the first start. Current sizes may differ.

Not sure which NVIDIA image? Take cuda13 when nvidia-smi shows driver 580 or newer and the card is an RTX; otherwise cuda12. A wrong pick does no harm: the container starts, says in plain words that the engine does not fit this card, and stops.

Ready-made images are published from version 0.2.1 on, to the GitHub Container Registry: ghcr.io/niko1221/strata:<version>-<flavor> (for example 0.2.20-cuda13), and ghcr.io/niko1221/strata:latest-<flavor> for the newest release of that flavor. Pin the version tag if you want updates only when you decide. The examples below use these images. If you built an image yourself (Build it yourself), use the tag you gave it (for example strata:0.2.20-cuda13) in their place.

One command per card

Each command runs Strata in the background, keeps your files in the volume strata-data, and listens only on this computer (127.0.0.1:8080). Choose FAMILY and MODEL, and generate your own key. The examples below select ISTA-DASLab originals explicitly (for Inkling-2-Mini and Tencent Hy4-Flash, see below). The first start downloads the model: watch it with docker logs -f strata. Already have the model's .gguf, .strata, or Hugging Face .safetensors files? Add -e MODEL_PATH=/models -v /your/folder:/models:ro and nothing is downloaded for the model itself (Files you already have).

NVIDIA

docker run -d --name strata --gpus all -p 127.0.0.1:8080:8080 \
  --ulimit memlock=-1:-1 --shm-size 2g --stop-timeout 120 \
  -v strata-data:/data -e FAMILY=qwen -e MODEL=IQ3_XXS -e API_KEY=$(openssl rand -hex 24) \
  ghcr.io/niko1221/strata:0.2.20-cuda13

AMD

docker run -d --name strata --device /dev/kfd --device /dev/dri \
  --group-add video --group-add $(getent group render | cut -d: -f3) -p 127.0.0.1:8080:8080 \
  --ulimit memlock=-1:-1 --shm-size 2g --stop-timeout 120 \
  -v strata-data:/data -e FAMILY=qwen -e MODEL=IQ3_XXS -e API_KEY=$(openssl rand -hex 24) \
  ghcr.io/niko1221/strata:0.2.20-rocm-gfx120x

Intel Arc

docker run -d --name strata --device /dev/dri --group-add $(getent group render | cut -d: -f3) \
  -p 127.0.0.1:8080:8080 --ulimit memlock=-1:-1 --shm-size 2g --stop-timeout 120 \
  -v strata-data:/data -e FAMILY=qwen -e MODEL=IQ3_S -e MODEL_PATH=/models -v /srv/gguf/IQ3_S:/models:ro \
  -e API_KEY=$(openssl rand -hex 24) ghcr.io/niko1221/strata:0.2.20-sycl

Inkling-2-Mini and Tencent Hy4-Flash

Every 0.2.20 image bundles all three engines (strata, strata-hy4, and strata-inkling), so switching model families only changes FAMILY and MODEL (or use :latest-<flavor> to track the newest release):

  • Inkling-2-Mini (Strata native .strata or Unsloth Dynamic GGUF): set FAMILY=inkling-2-mini with MODEL=SQ-10, SQ-15, or SQ-20 (native .strata), or an Unsloth GGUF size such as UD-Q4_K_XL:

    docker run -d --name strata --gpus all -p 127.0.0.1:8080:8080 \
      --ulimit memlock=-1:-1 --shm-size 2g --stop-timeout 120 \
      -v strata-data:/data -e FAMILY=inkling-2-mini -e MODEL=SQ-15 \
      -e API_KEY=$(openssl rand -hex 24) ghcr.io/niko1221/strata:0.2.20-cuda13
  • Tencent Hy4-Flash (Strata native .strata): set FAMILY=hy4-flash with MODEL=SQ-64, SQ-96, or SQ-128:

    docker run -d --name strata --gpus all -p 127.0.0.1:8080:8080 \
      --ulimit memlock=-1:-1 --shm-size 2g --stop-timeout 120 \
      -v strata-data:/data -e FAMILY=hy4-flash -e MODEL=SQ-64 \
      -e API_KEY=$(openssl rand -hex 24) ghcr.io/niko1221/strata:0.2.20-cuda13

To serve local .strata, .gguf, or official Hugging Face .safetensors files you already downloaded, mount the folder read-only and set MODEL_PATH=/models (Files you already have).

What the options are for: --ulimit memlock=-1:-1 lets the engine pin the RAM it uses for the model, --shm-size 2g gives it shared memory, and --stop-timeout 120 gives the model two minutes to unload when you stop the container (Docker's default 10 seconds is too short for a big model). Do not put a memory limit on the container: Strata plans from the whole computer's RAM and loads tens of GB.

To print the key you made: echo it before you start (it is in your shell history otherwise), or ask the running container: docker exec strata strata launch --show-key --preset docker.

Intel Arc

Strata's downloader prepares NVIDIA and AMD cards. For an Arc card the container uses prepared model files: the model's GGUF files in a folder you mount (-v /srv/gguf/IQ3_S:/models:ro and -e MODEL_PATH=/models), and the prepared pack and MTP layer in the data volume (/data/Strata-data/packs/<model> and /data/Strata-data/mtp/rt, made by the Intel installer on this or another computer, see INTEL.md). Without them the container tells you which file is missing and stops. Nothing is downloaded or prepared for Arc inside the container. Arc B-series cards (xe driver) stream the experts from the GGUF files, so the GGUF folder should be on a fast SSD.

Docker Compose

Ready-made files are in docker/compose/: docker-compose.nvidia.yml, docker-compose.amd.yml, docker-compose.intel.yml and .env.example. Copy the one for your card and its .env.example, edit, start:

cd tools/docker/compose
cp .env.example .env              # set FAMILY=qwen, MODEL=..., API_KEY=...
docker compose -f docker-compose.nvidia.yml up -d
docker compose -f docker-compose.nvidia.yml logs -f

They set what the commands above set: the GPU (deploy.resources.reservations.devices for NVIDIA, /dev/kfd and /dev/dri plus the video and render groups for AMD, /dev/dri for Intel), ulimits.memlock, shm_size, a two-minute stop_grace_period, the strata-data volume, and the port bound to 127.0.0.1. To let other computers reach it, set STRATA_BIND=0.0.0.0 in .env and keep a real API_KEY.

Settings

Everything is an environment variable (-e NAME=value, or in compose). They are the same questions strata launch asks on its screens; leave out what you do not care about.

Variable What it does Default
MODEL model size: IQ2_XS, IQ3_XXS, IQ3_S, Q2_0, UD-Q4_K_XL, SQ-10 / SQ-15 / SQ-20 (Inkling-2-Mini), SQ-64 / SQ-96 / SQ-128 (Hy4-Flash), ... (MODELS.md) Strata picks what suits the card, and says so in the log
FAMILY qwen, qwen36, hy4-flash, inkling-2-mini, unsloth, gyro, coder, swift, nvfp4; use qwen for the original ISTA-DASLab packs installer recommendation; may differ by hardware
MODEL_PATH model files you already have: a folder or one .gguf, .strata, or Hugging Face .safetensors file/folder, inside the container (mount it with -v, :ro is fine) download
ALLOW_DOWNLOAD 1: go on and download the model although model files of the older layout were left unread in /data/models (see From the older image) stop
CONTEXT how much text it remembers at once: 32k, 64k, 128k, 256k or a number the largest that fits
PARALLEL requests answered at the same time, 1 to 8 fitted to the card
VISION off, on (the model reads pictures), gpu, cpu; the picture-reader file (about 0.9 GB) is downloaded with the model off
KV conversation memory format: int8, q4_0 (half the memory), k8v4, fp16 int8
DRAFTING which drafter guesses ahead: auto, mtp, dflash2 or off auto
DRAFT_VOCAB which tokens the drafter may guess: cjk (with Chinese, Japanese and Korean), en, cyrillic, fr, latin or arabic (each with English and code) picked from the container's languages, else cjk
GPU / GPUS card numbers as the monitor lists them, 0 or 0,1; empty or all = the engine's choice. Changing it later makes the model's run settings again (the files stay) all that fit
GPU_ROLES a role for each card, 1=main,0=helper (main, helper, off; cards you do not name are off; not together with GPU / GPUS). Passed to launch --gpu-roles; see MULTI_GPU.md none
TUNE quick (runtime depends on hardware and workload), thorough, skip; done once and kept in the preset (RETUNE=1 tunes again) skip
API_KEY / API_KEY_FILE the key clients must send (below); the file form is for Docker secrets made for you
TUNE_ALLOW_SMALL 1 passes --tune-allow-small to launch (allow tuning on a small card) 0
PORT the port inside the container 8080
PRESET the preset name in /data docker
STRATA_SET advanced engine settings, space separated, like strata launch --set ("prefill=65536 STRATA_PIN_BY_NEED=1") none

The route tail skip (skipping rarely used parts of the model) is off in the container, as everywhere. STRATA_SET="STRATA_ROUTE_TAIL_SKIP=7" turns it on; the numbers for both choices are in DETAILS.md.

Your choices are saved as a preset in the volume. Start again with no settings and the saved preset is used; start with settings and they replace the saved ones (tuning results are kept). To change one thing, recreate the container with the new variable; the model and tuning stay in /data. Anything else: docker exec strata strata launch --help, or docker run --rm IMAGE strata launch --plan --family qwen --model q2_0 to see what a choice would do without starting anything.

What is in the volume /data: Strata-data/ (model files, the prepared pack), state/ (presets, tuning, the key), install/ (run settings and logs), home/. The engine and the Terminal are in the image, so updating the image never touches your files.

To keep it all on a big disk, mount a folder there instead of the named volume: -v /mnt/big/strata:/data (the folder must be writable by the container's user). Nothing large is written anywhere else in the container.

Files you already have

Mount the folder with the model's .gguf, .strata, or Hugging Face .safetensors files read-only and name it: -v /srv/gguf/IQ3_XXS:/models:ro -e MODEL_PATH=/models -e FAMILY=qwen -e MODEL=IQ3_XXS (or e.g. -v /srv/inkling2:/models:ro -e MODEL_PATH=/models -e FAMILY=inkling-2-mini -e MODEL=SQ-10). Nothing is downloaded for the model itself; any prepared pack is made in the volume.

  • The folder holds the files of one model directly (...-00001-of-00002.gguf, Inkling-2-Mini-SQ-10.strata, or model*.safetensors + config.json), not a folder of folders. If you mount a parent folder, the container says which sub-folder to name in MODEL_PATH.
  • The folder has to be mounted: a MODEL_PATH that is not in the container, or a folder with no .gguf, .strata, or .safetensors files, stops the start at once with a message, and nothing is downloaded.
  • Read-only (:ro) is fine. What is written to the volume is small next to the model: measured with the IQ3_XXS files, the prepared pack is 1.5 GB (the engine reads the experts from your GGUF files), the DFlash2 drafter 0.8 GB on disk (a 1.2 GB download, fetched once), and with VISION=on the picture reader 0.9 GB: 3.1 GB for the whole volume. With the MTP draft layer as the drafter instead (DRAFTING=mtp) the layer is about 6 GB, fetched once. VISION=off skips the picture reader.
  • Links to the files work when the links' targets are mounted too, and MODEL is set (without MODEL, Strata identifies the files itself and does not follow links).
  • Without MODEL_PATH, files you put into the volume by hand (/data/Strata-data/models/<model folder>/) are found as well, if they have the published names.

The API key

The server listens on every address inside the container (that is what lets the published port work), and Strata does not serve beyond this computer without a key. So a key is always on:

  • You set it with API_KEY (16 characters or more; openssl rand -hex 24 makes one) or API_KEY_FILE.
  • You do not: the first start makes one, keeps it in the volume, and the log tells you how to show it: docker exec strata strata launch --show-key --preset docker.

Publish the port as -p 127.0.0.1:8080:8080 to keep it on this computer. Publish it as -p 8080:8080 (or bind 0.0.0.0) only when other computers should reach it, and then use a key you chose. Strata warns in the log when the key is short. Every request must send Authorization: Bearer <key>; GET /health answers without one.

Connect your coding apps

From outside the container, the address is the published port and the key is yours:

  • OpenAI-compatible apps: base URL http://127.0.0.1:8080/v1, API key = your key, model name from GET /v1/models.
  • Anthropic-compatible apps (Claude Code): base URL http://127.0.0.1:8080, same key.

strata connect writes the settings file for OpenCode, Codex CLI, Claude Code, oh-my-pi, pi, Hermes Agent and OpenClaw, and checks that a prompt and a tool call work. Inside the container it fills in the key and the model for you:

docker exec strata strata connect opencode          # prints the file and the environment
docker exec strata strata connect opencode --check  # one prompt and one tool call, the way that app sends them

It prints http://127.0.0.1:8080, which is the address inside the container; on your computer use the published address (-p 127.0.0.1:9000:8080 makes it http://127.0.0.1:9000). If your coding app runs on your computer, install the strata Terminal there (TERMINAL_LAUNCH.md) and run strata connect opencode --url http://HOST:8080 --key <your key>.

Watch it and stop it

docker logs -f strata                       # what it is doing (the first start: the download)
docker exec -it strata strata monitor       # the live monitor (q leaves it, the server keeps running)
docker exec strata strata monitor --once    # one snapshot, for scripts
docker ps                                   # "healthy" once the model is loaded; "starting" while it downloads or loads
docker stop strata                          # drains, unloads the model, frees the graphics memory, exits 0
docker start strata                         # serving again in about a minute: the model and your choices are in the volume

The health check asks GET /v1/models with the key. During the first download the container shows starting, not unhealthy. docker stop sends SIGTERM; the container runs strata launch --stop, so the engine releases its memory properly. Give it time (--stop-timeout 120 or compose's stop_grace_period: 2m): with the default 10 seconds a big model can be killed (exit 137).

Updating

docker pull ghcr.io/niko1221/strata:0.2.20-cuda13      # the new tag (or :latest-cuda13; with a self-built image, build it again instead)
docker stop strata && docker rm strata
# run the same docker run command again with the new tag (compose: docker compose pull && docker compose up -d)

The models, the prepared pack, your preset and tuning stay in the volume strata-data; nothing is downloaded again. A new engine can make an old tuning result less useful: start once with -e TUNE=quick -e RETUNE=1 to tune again. strata update inside the container is not the way to update: the engine is part of the image.

Troubleshooting

"The engine in this image does not match this computer's graphics card" or the container stops right at the start. The card is not visible to the container, or the image is for another card. Check the options for your card in the commands and the table in Which image.

NVIDIA: could not select device driver "" with capabilities: [[gpu]], or docker: Error response from daemon: unknown or invalid runtime name: nvidia. The NVIDIA Container Toolkit is missing or Docker was not told about it:

sudo apt install nvidia-container-toolkit          # or your distribution's package; see NVIDIA's install guide
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
docker run --rm --gpus all ubuntu nvidia-smi       # must list your card

With Podman use CDI: sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml, then --device nvidia.com/gpu=all. If Podman cannot read that file (Ubuntu 24.04's Podman 4.9), see Podman below. If nvidia-smi inside the container works but Strata says the driver is too old, you picked cuda13 with a driver below 580: use the cuda12 image or update the driver.

AMD: Permission denied on /dev/kfd, or no card found. The container needs the device files and your user (or the container's user) must be allowed to use them. Add --device /dev/kfd --device /dev/dri and the groups --group-add video --group-add $(getent group render | cut -d: -f3) (the render group's number differs from computer to computer, so use the number, not the name). ls -l /dev/kfd /dev/dri/renderD* shows who owns them. On a computer with SELinux (Fedora, RHEL) that still refuses the device files, add --security-opt label=disable to the docker run.

Intel: no device found. Pass --device /dev/dri and --group-add <render group number> as above. An Arc card needs the i915 or xe driver on the host (ls /dev/dri/renderD* must show a device; lspci -k | grep -A3 -i arc shows the driver in use).

SELinux (Fedora, RHEL, Rocky): Permission denied on a folder you mounted. Add :z (shared) or :Z (private) to the mount: -v /srv/gguf/IQ3_XXS:/models:ro,z. A named volume like strata-data needs nothing.

The container is killed or the computer swaps. Strata loads tens of GB into RAM: leave the container without a memory limit, close other big programs, and pick a smaller MODEL (MODELS.md). The log prints a warning when it sees a memory limit.

docker stop took long or ended with exit code 137. The model was still unloading when Docker's time ran out. Use --stop-timeout 120 (compose: stop_grace_period: 2m).

Port already in use. Publish another host port: -p 127.0.0.1:9000:8080 (inside the container it stays 8080).

The first start says it is downloading but nothing moves. docker logs -f strata shows the percentage every few seconds; an interrupted download continues where it stopped when you start the container again. The volume needs the model's size free (the log names it).

"No MODEL was set" warning: fine, Strata chose a model for your card; set MODEL to choose yourself.

Podman (rootless, on Ubuntu)

The image runs under Podman as well; docker in the commands above becomes podman. Tested with rootless Podman 4.9.3 on Ubuntu 24.04, a Tesla P100 and the 0.2.16-cuda12 image: it serves, answers chat, tool calls and pictures, stops cleanly (exit code 0, the graphics memory is free again) and starts again from the same volume. Two things on such a computer differ from the Docker commands. Both are about the host, not the image.

Error: setting up CDI devices: unresolvable CDI devices nvidia.com/gpu=all. Podman 4.9 reads the CDI file (/etc/cdi/nvidia.yaml), but a newer nvidia-ctk writes a field it does not know (unknown field "additionalGids" in podman --log-level=debug run ...), so it ignores the whole file. A newer Podman reads it. Without one, pass the card the way the toolkit would: the device files of your card (one --device /dev/nvidiaN for each card, with the three shared ones) and the driver's libraries, read-only, at the names the engine looks for:

LIB=/usr/lib/x86_64-linux-gnu          # where your computer keeps them: ldconfig -p | grep 'libcuda.so.1'
GPU="--device /dev/nvidia0 --device /dev/nvidiactl --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools"
for lib in libcuda libnvidia-ml libnvidia-ptxjitcompiler libnvidia-nvvm; do
  [ -e $LIB/$lib.so.1 ] && GPU="$GPU -v $(readlink -f $LIB/$lib.so.1):$LIB/$lib.so.1:ro"
done
GPU="$GPU -v /usr/bin/nvidia-smi:/usr/bin/nvidia-smi:ro"

then use $GPU where the Docker commands have --gpus all:

podman run -d --name strata $GPU -p 127.0.0.1:8080:8080 \
  --ulimit memlock=-1:-1 --shm-size 2g --stop-timeout 120 \
  -v strata-data:/data -e FAMILY=qwen -e MODEL=IQ3_XXS -e API_KEY=$(openssl rand -hex 24) \
  ghcr.io/niko1221/strata:0.2.17-cuda12

If no card reaches the container, its start says so in plain words and stops (exit code 3) before anything is downloaded.

The container is killed while the model loads (exit code 137, no error in podman logs, OOMKilled is false). Ubuntu's systemd-oomd ends a program of your login when its memory has been under strain for 20 seconds, and a rootless container lives below your user manager (user@<your user number>.service), where it watches. Loading a model bigger than the free RAM can do that, most of all when an earlier start left its copy of the model's files in the memory cache (17 GB on the test computer). podman ps can even go on saying "running" for a container whose processes are gone; journalctl --user | grep "oomd killed" shows the kill.

  • From 0.2.17 the container gives that memory back itself before the engine starts, and says so in its log ([strata] memory guard: freed 16 GB of memory that still held copies of this model's files ...; STRATA_OOMD_ROOM=0 turns it off). Measured on a Tesla P100 computer with 62 GB of RAM, a start that had to build its pack first: the load was ended in 2 of 2 starts without it and went through in 2 of 2 with it.
  • With an older image, give the cache of the model's files back yourself right before podman run, no root needed (it only forgets copies of files on disk; nothing is deleted): for f in /srv/gguf/IQ3_XXS/*.gguf; do dd if=$f iflag=nocache count=0 status=none; done (the model's files on the host, and the same for the big files in the volume's folder). It is what 0.2.17 does inside the container; by hand it was only tried on a volume whose files were already prepared (2 starts, both served).
  • --cgroups=disabled is not a way out: Podman still puts its conmon and the container in a podman-<number>.scope below the user manager with that flag (checked in /proc/<pid>/cgroup), and a container started with it was ended by systemd-oomd too.
  • Docker (rootful) puts containers in the system's slice, where systemd-oomd does not look by default; that case was not tested.

From the older image

The 0.1.x image compiled the engine inside docker build and was set up with setup.py. The new ones are built from the engine package and start through strata launch. Mapping:

Older variable Now
MODEL, FAMILY, CONTEXT, API_KEY, PORT, KV, GPU, GPUS, VISION the same (VISION takes off|on|gpu|cpu; no / yes still work)
GGUF_DIR MODEL_PATH (the old name still works)
HOST not needed: the server listens on every address inside the container; choose where it is reachable with -p
LOW_RAM, RESIDENT_BUDGET_GIB, KV_STREAMING, LAYER_SPLIT, CONFIG, REINSTALL ignored with a warning; use STRATA_SET for engine settings and strata launch --help for the rest

A volume from the older image is picked up: the first start moves /data/models, /data/packs and /data/mtp into /data/Strata-data (a rename inside the volume: nothing is copied or downloaded again, and the prepared pack is kept). The old /data/config is not read; the run settings are made again from the files. A folder you mounted yourself at one of those places is left alone: point MODEL_PATH at it. If model files are still in /data/models when the container starts (a folder you mounted there, or a move that failed) and MODEL_PATH is not set, the start stops at once and says where the files are: it would otherwise download the model again, tens of GB, because this image does not read that place. Name the folder in MODEL_PATH, or set ALLOW_DOWNLOAD=1 to download anyway. The container name, the volume and the port can stay as they were.

Build it yourself

This is the way to get an image for a computer without registry access or after changing Strata. You need an engine package folder (made by tools/packaging/package_engine.py, or fetched by strata update into a components folder) and Docker on Linux:

tools/docker/build.sh --flavor cuda --engine ~/components/engine/<cuda13-package-folder> --tag strata:0.2.20-cuda13
tools/docker/build.sh --flavor hip  --engine ~/components/engine/<hip-rx9070-package-folder> --tag strata:0.2.20-rocm-gfx120x
tools/docker/build.sh --flavor sycl --engine ~/components/engine/<sycl-package-folder> --tag strata:0.2.20-sycl

build.sh assembles the build context (the Terminal's files and the package) and runs docker build. The build makes the Terminal exactly as the release archive (Python 3.12 and the locked packages, fetched at build time only), then checks the engine package before it may enter the image: every file's SHA-256, and that every library it imports is bundled or belongs to the system or the graphics driver (tools/packaging/binary_deps.py); finally it checks that the dynamic linker resolves every library inside the finished image. A package that fails any of these stops the build. Nothing is pushed anywhere. tools/docker/smoke-test.sh runs the checks we ran on real cards (serves, key, chat, tool call, monitor, clean stop, memory freed, restart); see its first lines for the variables.

From source. docker build -t strata:src --build-arg STRATA_COMMIT=$(git rev-parse HEAD) -f tools/docker/Dockerfile.src . in the repository compiles the CUDA 13 engines (strata, plus shape engines strata-hy4 and strata-inkling by default; pass --build-arg BUILD_HY4=0 or --build-arg BUILD_INKLING=0 to omit them) inside Docker, packages them into /opt/strata/components/engine/ and /opt/strata/components/shapes/, and puts them in the same kind of image (--build-arg CUDA_ARCHITECTURES=89 for one card only, much faster). The source Dockerfile is not the ready-made image's one, so it is named with -f; the build then takes its ignore list from tools/docker/Dockerfile.src.dockerignore. .git is not copied into the build, so the commit comes in as STRATA_COMMIT; without it the Terminal stage stops. For a GTX 10, P100 or V100 build the CUDA 12 variant: docker build -t strata:src-cuda12 --build-arg STRATA_COMMIT=$(git rev-parse HEAD) -f tools/docker/Dockerfile.src --build-arg CUDA_IMAGE=nvidia/cuda:12.9.2-devel-ubuntu24.04 --build-arg CUDA_ARCHITECTURES="60;61;70;75;80;86;89" . (the build turns on the Pascal / Volta code by itself when an architecture below 75 is listed, and names the package cuda12 with driver 575.51). The picture reader comes with it: it is built for the same architectures as the engine (native sm_60 / sm_61 code, not only PTX), and --build-arg BUILD_VISION=0 leaves it out for a text-only package. The CUDA 12 reader was checked on a Tesla P40 (sm_61, driver 580.178.04) on 2026-11-15: with --tower own it loaded on the card and read one 1,024-token picture in 12.6 s, and on a Tesla P100 (sm_60) and a Tesla V100 (sm_70) on 2026-11-16, where the image also served a model and answered a picture over its API. For AMD and Intel builds from source see AMD_HIP.md and INTEL.md; then package the result with tools/packaging/package_engine.py and use tools/docker/build.sh.

Publishing the images (for maintainers)

The images are built from the engine packages of a release, never from a build on the runner, so an image holds exactly the files the signed update feed names. Nothing publishes by itself: a maintainer starts the workflow, after the owner's OK.

  1. Make the release first (its strata-feed.json, strata-feed.json.sig and the engine archives must be on the GitHub release).
  2. GitHub, Actions, Docker images, Run workflow (.github/workflows/docker-images.yml; the file has to be on the default branch to show up). Inputs: the release tag (v0.2.20), the flavors (empty: every flavor the release has a package for), push and latest. Run it once with push off: it builds every image and publishes nothing (a dry run).
  3. Run it again with push on. It logs in to ghcr.io with the job's GITHUB_TOKEN (packages: write) and pushes ghcr.io/niko1221/strata:0.2.20-<flavor> and latest-<flavor>. Turn latest off for a pre-release.
  4. The first push creates each package as private. In the repository's Packages, open every package, Package settings, Change visibility, Public, and check it is linked to the repository (the image carries the org.opencontainers.image.source label).
  5. Check one pull from a computer that is not logged in: docker pull ghcr.io/niko1221/strata:0.2.20-cuda13.

For each flavor the job runs docker/fetch-engines.py, which reads the release's signed feed (the Ed25519 key in terminal/strata_control/update_keys.json), downloads the package, and checks the archive's size and SHA-256, the manifest hash, the package signature and every file's hash, exactly as strata update does; a package that fails stops the job before anything is built. docker/build.sh then builds the image (and checks the package again inside the build), and the job starts the image once to see that the Terminal inside it runs.

Flavor (tag suffix) Engine package in the release feed
cuda13 linux-x86_64, cuda, variant cuda13
cuda12 linux-x86_64, cuda, variant cuda12
rocm-gfx120x linux-x86_64, hip, variant rx9070 (gfx1200 / gfx1201)
rocm-gfx110x linux-x86_64, hip, variant rx7900 (gfx1100 / gfx1101 / gfx1102)
rocm-gfx1151 linux-x86_64, hip, variant halo (Strix Halo, gfx1151)
sycl linux-x86_64, sycl; only when the feed lists one

A flavor the feed has no package for is left out, with a line in the log. The same steps run from a Linux computer with Docker: tools/docker/publish.sh --release-tag v0.2.20 builds everything and pushes nothing; add --push (after docker login ghcr.io) to publish. The images run on the runner without a graphics card, so the card checks (tools/docker/smoke-test.sh) stay a manual step on a computer with the card.

Known limits

  • Linux x86-64 hosts only. Docker on Windows reaches NVIDIA cards only; Docker on a Mac cannot use the GPU.
  • The images run as root inside the container (GPU device files, page-locked memory). Run the container on a computer you trust the way you would run the app; do not mount folders you do not want it to read.
  • An Arc card needs prepared model files (see Intel).
  • AMD RX 7000 (gfx110x) and RDNA 3 iGPUs: the gfx110X image is built for gfx1100 / 1101 / 1102 (RX 7900, 7800, 7700, 7600). The Radeon 780M (gfx1103) is experimental and has its own engine package, not in these images.

History / older measurements

Tested on real cards. Checks (tools/docker/smoke-test.sh): the container serves, GET /v1/models answers (and refuses a request without the key), a one-word chat and a tool call work, docker exec strata monitor --once works, docker stop ends it with exit code 0 and the graphics memory is free again, and a second start reuses the saved preset.

Date Images built from Card Result
2026-11-23 0.2.20 published images (engine 0.1.66, all three engines strata, strata-hy4, strata-inkling bundled) 0.2.20-cuda13 on 2x RTX A4000 (driver 580.178.04, Podman 4.9.3); 0.2.20-rocm-gfx120x on Radeon AI PRO R9700 (gfx1201, Podman 4.9.3); 0.2.20-sycl image inspected All three bundled engines verified (ldd clean, signed manifests) and strata launch --plan passed across Qwen3.8, Qwen3.6, Hy4-Flash, and Inkling-2-Mini. Live serving passed with Qwen3.6-35B-A3B-UD-Q4_K_XL on RTX A4000 (ready in 89 s, 401 without key, healthcheck.sh, chat, monitor --once, connect opencode, clean SIGTERM stop in 4 s with exit 0) and Inkling-2-Mini-SQ-10 on R9700 (ready in 21 s, 401 without key, healthcheck.sh, pong chat, monitor --once, connect opencode, clean SIGTERM stop in <1 s with exit 0).
2026-10-19 0.2.0-beta engine packages (engine 0.1.45.3), fetched and checked against the signed feed cuda13 and cuda12 on one RTX A4000 (driver 580); rocm-gfx120x on one Radeon AI PRO R9700 All passed. Serving 71-161 s after docker run with the prepared files; docker stop took 4-5 s with exit code 0. rocm-gfx110x and rocm-gfx1151 passed the package and library checks but did not run on a card. On a computer without an AMD card the rocm-gfx120x container says the engine does not match the card and exits with code 3.
2026-10-17 0.1.45 engine packages RTX 3060 (cuda13, cuda12), Radeon AI PRO R9700 (rocm-gfx120x), Intel Arc Pro B70 (sycl) All checks passed on each. Not run on a card: cuda12 on Pascal / Volta (it ran on the RTX 3060), rocm-gfx110x (RX 7000).