Skip to content

Commit 83ed300

Browse files
author
Isaac Feldman
committed
add: nvidia-cdi-hook to nvidia-container-toolkit
For full CDI support, the `nvidia-container-toolkit` package should include the `nvidia-cdi-hook`. The hook nvidia-cdi-hook is the CLI tool that is expected to be called by the container runtime, when specified by the CDI file. For more information about how this hook is packaged by NVIDIA, see the official RPM [1]. For how the CDI hook interacts with the container runtime, see the CDI hook documentation [2]. [1]: https://github.com/NVIDIA/nvidia-container-toolkit/blob/main/packaging/rpm/SPECS/nvidia-container-toolkit.spec [2]: https://github.com/NVIDIA/nvidia-container-toolkit/blob/main/cmd/nvidia-cdi-hook/README.md
1 parent fd5148f commit 83ed300

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/nvidia-container-toolkit/nvidia-container-toolkit.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export GOLDFLAGS="-compressdwarf=false -linkmode=external -extldflags '${CGO_LDF
5858

5959
go build -ldflags="${GOLDFLAGS}" -o nvidia-container-runtime-hook ./cmd/nvidia-container-runtime-hook
6060
go build -ldflags="${GOLDFLAGS}" -o nvidia-ctk ./cmd/nvidia-ctk
61+
go build -ldflags="${GOLDFLAGS}" -o nvidia-cdi-hook ./cmd/nvidia-cdi-hook
6162

6263
%install
6364
install -d %{buildroot}%{_cross_bindir}
@@ -69,6 +70,7 @@ install -d %{buildroot}%{_cross_factorydir}/nvidia-container-runtime
6970
install -d %{buildroot}%{_cross_templatedir}/nvidia-container-runtime
7071
install -p -m 0755 nvidia-container-runtime-hook %{buildroot}%{_cross_bindir}/
7172
install -p -m 0755 nvidia-ctk %{buildroot}%{_cross_bindir}/
73+
install -p -m 0755 nvidia-cdi-hook %{buildroot}%{_cross_bindir}/
7274
install -m 0644 %{S:1} %{buildroot}%{_cross_factorydir}/nvidia-container-runtime/
7375
install -m 0644 %{S:2} %{buildroot}%{_cross_factorydir}/nvidia-container-runtime/
7476
install -m 0644 %{S:3} %{buildroot}%{_cross_templatedir}/nvidia-oci-hooks-json
@@ -83,6 +85,7 @@ ln -s shimpei %{buildroot}%{_cross_bindir}/nvidia-oci
8385
%{_cross_attribution_file}
8486
%{_cross_bindir}/nvidia-container-runtime-hook
8587
%{_cross_bindir}/nvidia-ctk
88+
%{_cross_bindir}/nvidia-cdi-hook
8689
%{_cross_bindir}/nvidia-oci
8790
%{_cross_templatedir}/nvidia-oci-hooks-json
8891
%{_cross_udevrulesdir}/90-nvidia-gpu-devices.rules

0 commit comments

Comments
 (0)