Table of Contents

# Build llamacpp server docker image on raspberry pi

Because the official image(ghcr.io/ggml-org/llama.cpp:server) is not available for linux/arm64, we need to build it ourselves.

Steps:

  1. Clone the llama.cpp repository into raspberry pi, and cd into it.
  2. Edit the .devops/cpu.Dockerfile, switch DGGML_CPU_ALL_VARIANTS to OFF at cmake command args.
  3. Run Docker build command.
docker build -f .devops/cpu.Dockerfile --target server --build-arg TARGETARCH=arm64 .
Note

Because we only need run on raspberry pi, we can switch DGGML_CPU_ALL_VARIANTS to OFF,

prevent building unnecessary variants and errors.

Then you get an image that can run on raspberry pi.

Reference