Skip to content

Commit

Permalink
[3.0] Fix and upgrade nvidia-container-toolkit and libnvidia-container (
Browse files Browse the repository at this point in the history
microsoft#9403)

Co-authored-by: Henry Li <[email protected]>
  • Loading branch information
2 people authored and xiaohongdeng committed Nov 21, 2024
1 parent 3070e9a commit 013b313
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 22 deletions.
4 changes: 2 additions & 2 deletions SPECS/libnvidia-container/libnvidia-container.signatures.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Signatures": {
"libnvidia-container-1.14.4.tar.gz": "074cf994e9190034f3a35f1247d3b0983633ccd3a00cb27f329ac3471cbb388f",
"nvidia-modprobe-495.44.tar.gz": "ae6e9c7e6b43368945c28f6b8b6d0d7cc36ee7e1be8955a009a1cb189e46de92"
"libnvidia-container-1.15.0.tar.gz": "6633fcadadb6b8d517e2859f4edd9b20cbb3702d7b3b7c4ac41617ca9891d1b9",
"nvidia-modprobe-550.54.14.tar.gz": "5687b0dfa6087dd480ae91e91ff1dca975794e35a2edcf9ec08d8f9cb98ef905"
}
}
11 changes: 7 additions & 4 deletions SPECS/libnvidia-container/libnvidia-container.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%define modprobe_version 495.44
%define modprobe_version 550.54.14
%define _major 1
%define mod_probe_dir deps/src/nvidia-modprobe-%{modprobe_version}
Summary: NVIDIA container runtime library
Name: libnvidia-container
Version: 1.14.4
Version: 1.15.0
Release: 1%{?dist}
License: BSD AND ASL2.0 AND GPLv3+ AND LGPLv3+ AND MIT AND GPLv2
Vendor: Microsoft Corporation
Expand Down Expand Up @@ -40,8 +40,8 @@ touch %{mod_probe_dir}/.download_stamp

%build
sed -i 's/^MAJOR[[:space:]]*:=.*$/MAJOR := 1/' versions.mk
sed -i 's/^MINOR[[:space:]]*:=.*$/MINOR := 14/' versions.mk
sed -i 's/^PATCH[[:space:]]*:=.*$/PATCH := 4/' versions.mk
sed -i 's/^MINOR[[:space:]]*:=.*$/MINOR := 15/' versions.mk
sed -i 's/^PATCH[[:space:]]*:=.*$/PATCH := 0/' versions.mk
%make_build WITH_LIBELF=yes

%install
Expand Down Expand Up @@ -135,6 +135,9 @@ This package contains command-line tools that facilitate using the library.
%{_bindir}/*

%changelog
* Fri Jun 07 2024 Henry Li <[email protected]> - 1.15.0-1
- Upgrade to version 1.15.0

* Fri Apr 16 2024 Henry Li <[email protected]> - 1.14.4-1
- Upgrade to version 1.14.4
- Add external specification of package versioning to build
Expand Down
8 changes: 5 additions & 3 deletions SPECS/libnvidia-container/nvidia-modprobe.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -ruN nvidia-modprobe-495.44/modprobe-utils/nvidia-modprobe-utils.c nvidia-modprobe-495.44-patched/modprobe-utils/nvidia-modprobe-utils.c
--- nvidia-modprobe-495.44/modprobe-utils/nvidia-modprobe-utils.c 2021-11-13 14:36:58.096684602 +0000
+++ nvidia-modprobe-495.44-patched/modprobe-utils/nvidia-modprobe-utils.c 2021-11-13 14:43:40.965146390 +0000
@@ -888,10 +888,10 @@
@@ -959,10 +959,10 @@
return mknod_helper(major, minor_num, vgpu_dev_name, NV_PROC_REGISTRY_PATH);
}

Expand All @@ -19,11 +19,13 @@ diff -ruN nvidia-modprobe-495.44/modprobe-utils/nvidia-modprobe-utils.c nvidia-m
diff -ruN nvidia-modprobe-495.44/modprobe-utils/nvidia-modprobe-utils.h nvidia-modprobe-495.44-patched/modprobe-utils/nvidia-modprobe-utils.h
--- nvidia-modprobe-495.44/modprobe-utils/nvidia-modprobe-utils.h 2021-11-13 14:36:58.096684602 +0000
+++ nvidia-modprobe-495.44-patched/modprobe-utils/nvidia-modprobe-utils.h 2021-11-13 14:38:34.078700961 +0000
@@ -81,6 +81,7 @@
@@ -87,6 +87,7 @@
int nvidia_nvswitch_get_file_state(int minor);
int nvidia_cap_mknod(const char* cap_file_path, int *minor);
int nvidia_cap_get_file_state(const char* cap_file_path);
+int nvidia_cap_get_device_file_attrs(const char* cap_file_path, int *major, int *minor, char *name);
int nvidia_cap_imex_channel_mknod(int minor);
int nvidia_cap_imex_channel_file_state(int minor);
int nvidia_get_chardev_major(const char *name);
int nvidia_msr_modprobe(void);


Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Signatures": {
"nvidia-container-toolkit-1.14.4-vendor.tar.gz": "5c4f1ba9c6e3cacc1002ece40c93928f8836824532f5e0b8c6bcea2322dc3123",
"nvidia-container-toolkit-1.14.4.tar.gz": "bc490ec639cda474ee5876349bf686411107301c666a246d4a58045b3332c6eb"
"nvidia-container-toolkit-1.15.0-vendor.tar.gz": "bf7f794e9ec7be779707c4ef9ea5bd813f767b49a76729115716110dafa1b7c2",
"nvidia-container-toolkit-1.15.0.tar.gz": "9ecf53ffce76404de6717745a55b82d40d3217b43c1ab27acc7d8b15238b6edc"
}
}
13 changes: 8 additions & 5 deletions SPECS/nvidia-container-toolkit/nvidia-container-toolkit.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%global debug_package %{nil}
Summary: NVIDIA container runtime hook
Name: nvidia-container-toolkit
Version: 1.14.4
Version: 1.15.0
Release: 1%{?dist}
License: ALS2.0
Vendor: Microsoft Corporation
Expand Down Expand Up @@ -65,13 +65,12 @@ install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime-hook
install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime
install -m 755 -t %{buildroot}%{_bindir} nvidia-ctk

mkdir -p %{buildroot}%{_sysconfdir}/nvidia-container-runtime
mkdir -p %{buildroot}%{_libexecdir}/oci/hooks.d
mkdir -p %{buildroot}%{_datadir}/containers/oci/hooks.d

%posttrans
ln -sf %{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-toolkit

# Generate the default config; If this file already exists no changes are made.
%{_bindir}/nvidia-ctk --quiet config --config-file=%{_sysconfdir}/nvidia-container-runtime/config.toml --in-place

%postun
rm -f %{_bindir}/nvidia-container-toolkit

Expand All @@ -85,6 +84,10 @@ rm -f %{_bindir}/nvidia-container-toolkit
%{_bindir}/nvidia-ctk

%changelog
* Fri Jun 07 2024 Henry Li <[email protected]> - 1.15.0-1
- Upgrade to version 1.15.0
- Generate config.toml file during %posttrans

* Mon Feb 05 2024 Bala <[email protected]> - 1.14.4-1
- Upgrade to version 1.14.4
- Remove config and oci hooks from files as they are handled in post-install from v1.14.0
Expand Down
12 changes: 6 additions & 6 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10331,8 +10331,8 @@
"type": "other",
"other": {
"name": "libnvidia-container",
"version": "1.14.4",
"downloadUrl": "https://github.com/NVIDIA/libnvidia-container/archive/v1.14.4.tar.gz"
"version": "1.15.0",
"downloadUrl": "https://github.com/NVIDIA/libnvidia-container/archive/v1.15.0.tar.gz"
}
}
},
Expand Down Expand Up @@ -14292,8 +14292,8 @@
"type": "other",
"other": {
"name": "nvidia-container-toolkit",
"version": "1.14.4",
"downloadUrl": "https://github.com/NVIDIA/nvidia-container-toolkit/archive/v1.14.4.tar.gz"
"version": "1.15.0",
"downloadUrl": "https://github.com/NVIDIA/nvidia-container-toolkit/archive/v1.15.0.tar.gz"
}
}
},
Expand All @@ -14302,8 +14302,8 @@
"type": "other",
"other": {
"name": "nvidia-modprobe",
"version": "495.44",
"downloadUrl": "https://github.com/NVIDIA/nvidia-modprobe/archive/495.44.tar.gz"
"version": "550.54.14",
"downloadUrl": "https://github.com/NVIDIA/nvidia-modprobe/archive/550.54.14.tar.gz"
}
}
},
Expand Down

0 comments on commit 013b313

Please sign in to comment.