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, 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 --recursivesudo systemctl enable docker.socketcargo 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 tagged localhost:5000/<name>:latest by default. Override the registry and
tag to build under your own registry:
The deployable images are built for linux/amd64 (the NICo Dockerfiles are x86_64).
On an arm64 host such as Apple Silicon they build under emulation, which is slow — a
native linux/amd64 build host is recommended. Pass PLATFORM=linux/arm64 to build
native arm64 images instead.
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 images were produced:
The count should be exactly 14:
If the count is less than 14, the missing images indicate which sub-target failed. The three boot/validation images (machine-validation, boot-artifacts-x86_64, boot-artifacts-aarch64) require the full mkosi + Rust toolchain — if only 11 images appear, use make images instead of make images-all to build the deployable stack without them.
Three intermediate images are also created locally but are not tagged under IMAGE_REGISTRY: nico-buildcontainer-x86_64, nico-runtime-container-x86_64, and machine-validation-runner. These are build-time dependencies only and do not need to be pushed.
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.