Skip to content

Docker and deployment

Each release publishes a multi-arch image (linux/amd64 and linux/arm64) to GitHub Container Registry:

docker run -p 1974:1974 -v pion-data:/data ghcr.io/pavelhorak/pion
redis-cli -p 1974 PING     # +PONG

Data (WAL, snapshots, blob arenas) lives in the /data volume. The image runs with --epoll, because Docker's default seccomp profile blocks io_uring, and ships no Python, so features that need an embedding model need a host install. Building the image yourself, bind mounts and io_uring: doc/operations.md §5.

Prebuilt tarballs and the release pipeline

Official binaries are built by CI from a v* tag (.github/workflows/release.yml): macOS arm64, Linux x86_64 and Linux arm64, each tested before upload, with the versioned tarballs, byte-identical pion-<platform>.tar.gz aliases and SHA256SUMS.

Prebuilt tarball:

tar -xzf pion-<version>-macos-arm64.tar.gz && cd pion-<version>-macos-arm64
./pion-server.sh                    # wrapper sets the dyld/ld library path

Run the wrapper, not bin/pion-server: the tarball bundles the Mojo runtime libraries the binary needs, and the wrapper points the loader at them.

Linux tarballs (x86_64, arm64) need glibc 2.38 or newer: Ubuntu 24.04, Debian 13, Fedora 39 or later. On an older system the binary stops with GLIBC_2.38 not found; use the Docker image instead. The x86_64 build is the portable one (x86-64-v2, no GPU code). Verify a download against the release's SHA256SUMS with shasum -a 256 -c SHA256SUMS --ignore-missing (without the flag it reports every tarball you did not download as FAILED).

Metal shader library (macOS). --metal-attention loads metal_compute.metallib, searched relative to the executable: <exe>/, <exe>/../lib, <exe>/../share/pion, <exe>/../src/ffi, <exe>/src/ffi (a source build at the repo root), then the working directory. PION_METAL_LIB overrides the search. The banner prints Metal Attn: requested, and the engine then prints Metal Attn: ACTIVE (<path>) or Metal Attn: NOT ACTIVE under the same key, so one grep answers whether it is running.

Inference sidecar. When the PyTorch sidecar (--inference, or auto-embed) cannot be found — a release tarball ships none — the server says so and starts without it rather than waiting. When it can be found, the server listens first and the sidecar starts concurrently, so clients queue instead of being refused.

Building a tarball yourself — scripts/package_release.sh (run on the target platform; add --build to build first):

scripts/package_release.sh          # → dist/pion-<version>-<os>-<arch>.tar.gz

It ships ./pion-server as it finds it, so build at HEAD first; it refuses a working tree with uncommitted changes (--allow-dirty overrides for local use). On macOS it refuses when src/ffi/metal_compute.metallib is missing or older than metal_compute.metal — building the shaders needs full Xcode, not only the Command Line Tools. To test a tarball the way a user will run it, hide .pixi/envs/default/lib first: the binary's baked rpath points there, so an unpacked tarball resolves its libraries on the build machine whether or not the bundle is complete.

Docker — root Dockerfile, multi-arch, GPU-free:

docker buildx build --platform linux/amd64,linux/arm64 -t pion .
docker run -p 1974:1974 -v pion-data:/data pion
  • amd64 builds with build-portable (--target-cpu x86-64-v2) so the image runs on any x86-64 host; arm64 uses the default GPU-free build.
  • Default CMD is --epoll --no-auto-embed: Docker's default seccomp profile blocks io_uring (Docker ≥ 25), and the slim image ships no Python/torch for the embedding sidecar. For io_uring: docker run --security-opt seccomp=unconfined pion --no-auto-embed.
  • State (WAL, snapshots, blob arenas) lands in the /data volume.
  • The published image is ghcr.io/pavelhorak/pion, built by the release workflow from the tagged source. It runs as the unprivileged pion user, so use a named volume (-v pion-data:/data), which inherits /data's ownership from the image. A bind mount keeps the host directory's owner and the WAL cannot be created; chown the host directory to the image's pion uid first.
  • docker build --target runtime-prebuilt -t pion:dev . wraps an already-built host ./pion-server and its runtime libraries in seconds, for local use. The default target builds from source (a cold build takes a long time on a small machine, the toolchain layer is cached; budget several GB of build cache, docker builder prune -f reclaims it).
  • Dockerfile.linux + docker/run-linux.sh are an interactive Linux dev shell, not the shippable image.

CUDA images are a separate lane (the linux-64 default build requires nvcc; see pixi.toml).


Supervised serving with auto-restart, crash breadcrumbs and the status file: Running in production.