# 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:
- Clone the llama.cpp repository into raspberry pi, and cd into it.
- Edit the .devops/cpu.Dockerfile, switch
DGGML_CPU_ALL_VARIANTStoOFFat cmake command args. - 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.