Skip to content

build(arm64): cross-compile parakeet-cli for the Raspberry Pi 5#32

Open
richiejp wants to merge 1 commit into
mudler:masterfrom
richiejp:build/arm64-cross-compile
Open

build(arm64): cross-compile parakeet-cli for the Raspberry Pi 5#32
richiejp wants to merge 1 commit into
mudler:masterfrom
richiejp:build/arm64-cross-compile

Conversation

@richiejp

Copy link
Copy Markdown
Contributor

Static, self-contained aarch64 build via docker buildx + qemu, mirroring the
privacy-filter.cpp approach. Base ubuntu:24.04 matches the Pi 5's glibc 2.39 ABI
so the binary drops straight on; it targets the Cortex-A76
(armv8.2-a+dotprod+fp16) and links only the system libc/libstdc++/libgomp (ggml
and libparakeet are static).

docker buildx build --platform linux/arm64 -f docker/Dockerfile.arm64
--target export --output type=local,dest=build/arm64 .

The build context drops .git (.dockerignore), which dangles the ggml submodule's
gitlink and breaks scripts/apply_ggml_patches.sh (it uses git apply). Re-init a
throwaway git repo in the submodule tree before configure so the in-tree ggml
patches (the sgemm broadcast-fold, etc.) apply -- worth ~9% at 4 threads on the Pi.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Static, self-contained aarch64 build via docker buildx + qemu, mirroring the
privacy-filter.cpp approach. Base ubuntu:24.04 matches the Pi 5's glibc 2.39 ABI
so the binary drops straight on; it targets the Cortex-A76
(armv8.2-a+dotprod+fp16) and links only the system libc/libstdc++/libgomp (ggml
and libparakeet are static).

  docker buildx build --platform linux/arm64 -f docker/Dockerfile.arm64 \
      --target export --output type=local,dest=build/arm64 .

The build context drops .git (.dockerignore), which dangles the ggml submodule's
gitlink and breaks scripts/apply_ggml_patches.sh (it uses `git apply`). Re-init a
throwaway git repo in the submodule tree before configure so the in-tree ggml
patches (the sgemm broadcast-fold, etc.) apply -- worth ~9% at 4 threads on the Pi.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mudler

mudler commented Jun 19, 2026

Copy link
Copy Markdown
Owner

@richiejp can we hook up to the CI images so it gets published?

@richiejp

Copy link
Copy Markdown
Contributor Author

I guess there are two ways to go about this, one is to publish a docker image, which I'm not sure it makes sense for Rpi or do true static compilation including libc and OpenMP. The later makes most sense to me if it is possible. I'll give it a shot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants