If you want to build or customize the toolbox containers yourself (rather than using the pre-built Docker Hub images), this guide explains the process. Local builds are useful if you want to:
- Use a patched or forked version of llama.cpp
- Add additional tools or libraries
- Change the Fedora base image (Rawhide vs. stable)
- Audit every installed dependency
- Podman (recommended on Fedora) or Docker (also fine)
Each backend has its own subdirectory and Dockerfile in toolboxes/.
Example: Build the Vulkan RADV toolbox image
cd toolboxes
podman build --no-cache -t llama-vulkan-radv -f Dockerfile.vulkan-radv .Example: Build the ROCm 6.4.2 toolbox image
cd toolboxes
podman build --no-cache -t llama-rocm-6.4.2 -f Dockerfile.rocm-6.4.2 .You can use
docker buildif you prefer Docker.
- llama.cpp version: Change the
git cloneorgit checkoutline in the Dockerfile. - Extra dependencies: Add them to the Dockerfile as needed.
- Other customizations: Install tools, patch scripts, or swap to a different base image.
Create a new toolbox using your freshly built image:
toolbox create llama-vulkan-radv --image localhost/llama-vulkan-radv \
-- --device /dev/dri --group-add video --security-opt seccomp=unconfinedReplace the backend/image name and device/group options as needed (see main README Section 2.1).
- Build fails (ROCm images especially): Try building with more memory or swap.
- Toolbox can't access GPU: Make sure you pass the correct device/group options.