Noel Georgi 76ea5dc465
feat: nvidia extension rework
Rework and cleanup the NVIDIA extensions so that it uses standard paths and is easier to maintain.

Signed-off-by: Noel Georgi <git@frezbo.dev>
(cherry picked from commit fdd02585f835159c1266f1b141f67423e3450d2a)
2026-04-15 14:08:19 +04:00

54 lines
1.6 KiB
YAML

name: nvidia-container-runtime
variant: scratch
shell: /bin/bash
install:
- build-base
- gcc-14
- bash
- go
- patch
dependencies:
- image: cgr.dev/chainguard/wolfi-base@{{ .WOLFI_BASE_REF }}
steps:
- sources:
- url: https://github.com/NVIDIA/nvidia-container-toolkit/archive/refs/tags/{{ .CONTAINER_TOOLKIT_VERSION }}.tar.gz
destination: container-toolkit.tar.gz
sha256: {{ .CONTAINER_TOOLKIT_SHA256 }}
sha512: {{ .CONTAINER_TOOLKIT_SHA512 }}
env:
CC: gcc-14
CXX: g++-14
GIT_COMMIT: {{ substr 0 7 .CONTAINER_TOOLKIT_REF }} # build is using short sha
prepare:
- |
mkdir -p container-toolkit
tar -xzf container-toolkit.tar.gz --strip-components=1 -C container-toolkit
build:
- |
cd container-toolkit
make cmds
install:
- |
mkdir -p /rootfs/usr/{bin,local/bin}
cd container-toolkit
find . -maxdepth 1 -type f -executable -exec cp {} /rootfs/usr/local/bin/ \;
ln -s /usr/local/bin/nvidia-ctk /rootfs/usr/bin/nvidia-ctk
ln -s /usr/local/bin/nvidia-cdi-hook /rootfs/usr/bin/nvidia-cdi-hook
- |
mkdir -p /rootfs/etc/cri/conf.d
cp /pkg/10-nvidia-container-runtime.part /rootfs/etc/cri/conf.d/10-nvidia-container-runtime.part
sbom:
outputPath: /rootfs/usr/local/share/spdx/nvidia-container-runtime.spdx.json
version: {{ .CONTAINER_TOOLKIT_VERSION }}
cpes:
- cpe:2.3:a:nvidia:nvidia_container_toolkit:{{ .CONTAINER_TOOLKIT_VERSION }}:*:*:*:*:*:*:*
licenses:
- Apache-2.0
finalize:
- from: /rootfs
to: /rootfs