Building NICo Containers
This section provides instructions for building the containers for NVIDIA Infra Controller (NICo).
Installing Prerequisite Software
An Ubuntu 24.04 host or VM with at least 150GB of free disk space is required, and git and make must also be installed (macOS is not supported).
Clone the repo and run the build-host bootstrap. It installs everything needed to build the containers and boot artifacts — system packages, rustup, the mkosi/ipxe git submodules, Docker with cross-architecture emulation, and the cargo build tooling — in one idempotent step:
Reboot (or log out and back in) afterwards so the docker group membership and the
userns sysctl change take effect.
Manual setup (what make bootstrap does)
make bootstrap runs scripts/setup-build-host.sh, which is equivalent to the following
steps on an apt-based distribution such as Ubuntu 24.04:
apt-get install build-essential cpio direnv mkosi uidmap curl file fakeroot git docker.io docker-buildx sccache protobuf-compiler libopenipmi-dev libudev-dev libboost-dev libgrpc-dev libprotobuf-dev libssl-dev libtss2-dev kea-dev systemd-boot systemd-ukify jq zip- Add the correct hook for your shell
- Install rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh(select Option 1) - Start a new shell to pick up changes made from direnv and rustup.
- Clone NICo -
git clone git@github.com:NVIDIA/infra-controller.git infra-controller cd infra-controllerdirenv allowgit submodule update --init --recursive- Start Docker and register cross-architecture support:
sudo systemctl enable --now docker.socket, thensudo docker run --privileged --rm tonistiigi/binfmt@sha256:400a4873b838d1b89194d982c45e5fb3cda4593fbfd7e08a02e76b03b21166f0 --install all cargo install cargo-make cargo-cacheecho "kernel.apparmor_restrict_unprivileged_userns=0" | sudo tee /etc/sysctl.d/99-userns.confsudo usermod -aG docker $(id -un)reboot
Build all images with one command
Once the prerequisites above are installed, build the NICo container images from the
top of the repo with a single make command:
Images are pushed as linux/amd64 and linux/arm64 manifests at
localhost:5000/<name>:latest by default. The Makefile starts a local registry named
nico-build-registry when that default is used. Override the registry and tag to publish
under your own registry; authenticate Docker to that registry before running the build:
Each architecture is built separately before the bare tag is assembled. This matches CI and is required for the REST Dockerfiles: a single combined Buildx invocation would reuse one builder stage and could copy an amd64 binary into the arm64 image. Building the non-native architecture uses the platforms configured on the active Docker Buildx builder.
Run make help from the repo root to list the individual image targets (images-core,
images-rest, images-machine-validation, images-boot-artifacts, images-bfb). The
sections below document the per-image build commands that these targets wrap, for when you
need to build or debug a single image.
Verifying the build
After make images-all completes, verify that all 14 deployable image tags contain both
platforms:
The loop should print exactly 14 successful checks:
If the loop exits early, the FAIL line identifies which image has an incomplete
manifest. The three boot/validation images (machine-validation,
boot-artifacts-x86_64, boot-artifacts-aarch64) require the full mkosi + Rust
toolchain. Use make images instead of make images-all to build only the 11-image
deployable stack.
The architecture-specific Core base images and -amd64/-arm64 service tags are build
inputs for the bare multi-arch tags. machine-validation-runner is the only local-only
intermediate image.
Building X86_64 Containers
NOTE: Execute these tasks in order. All commands are run from the top of the infra-controller directory.
Building the X86 build container
Building the X86 runtime container
Building the boot artifact containers
Building the Machine Validation images
Building nico-core container
Building the AARCH64 Containers and artifacts
Building the Cross-compile container
Building the admin-cli
The admin-cli build does not produce a container. It produces a binary:
$REPO_ROOT/target/release/nico-admin-cli
Building the DPU BFB
NOTE: The CONTAINER_RUNTIME_AARCH64=alpine:latest build argument must be included. The aarch64 binaries are bundled into an x86 container.