2019-10-22 21:36:22 +00:00
|
|
|
Name: nvidia-container-toolkit
|
|
|
|
Version: %{version}
|
|
|
|
Release: %{release}
|
|
|
|
Group: Development Tools
|
|
|
|
|
|
|
|
Vendor: NVIDIA CORPORATION
|
|
|
|
Packager: NVIDIA CORPORATION <cudatools@nvidia.com>
|
|
|
|
|
2022-07-08 10:05:12 +00:00
|
|
|
Summary: NVIDIA Container Toolkit
|
|
|
|
URL: https://github.com/NVIDIA/nvidia-container-toolkit
|
2020-06-09 03:03:19 +00:00
|
|
|
License: Apache-2.0
|
2019-10-22 21:36:22 +00:00
|
|
|
|
2021-09-06 10:22:04 +00:00
|
|
|
Source0: nvidia-container-runtime-hook
|
2023-02-07 20:10:31 +00:00
|
|
|
Source1: nvidia-ctk
|
2023-08-11 13:40:00 +00:00
|
|
|
Source2: LICENSE
|
|
|
|
Source3: nvidia-container-runtime
|
|
|
|
Source4: nvidia-container-runtime.cdi
|
|
|
|
Source5: nvidia-container-runtime.legacy
|
2024-04-24 08:47:45 +00:00
|
|
|
Source6: nvidia-cdi-hook
|
2021-09-06 11:51:39 +00:00
|
|
|
|
2022-07-18 12:33:04 +00:00
|
|
|
Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook <= 1.4.0-2
|
2021-09-06 11:51:39 +00:00
|
|
|
Provides: nvidia-container-runtime
|
2019-10-22 21:36:22 +00:00
|
|
|
Provides: nvidia-container-runtime-hook
|
2022-06-13 13:41:35 +00:00
|
|
|
Requires: libnvidia-container-tools >= %{libnvidia_container_tools_version}, libnvidia-container-tools < 2.0.0
|
2022-07-18 12:33:04 +00:00
|
|
|
Requires: nvidia-container-toolkit-base == %{version}-%{release}
|
2019-10-22 21:36:22 +00:00
|
|
|
|
|
|
|
%description
|
2022-07-08 10:05:12 +00:00
|
|
|
Provides tools and utilities to enable GPU support in containers.
|
2019-10-22 21:36:22 +00:00
|
|
|
|
|
|
|
%prep
|
2024-04-24 08:47:45 +00:00
|
|
|
cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} .
|
2019-10-22 21:36:22 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
2021-09-06 10:22:04 +00:00
|
|
|
install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime-hook
|
2021-09-06 11:51:39 +00:00
|
|
|
install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime
|
2023-02-07 20:10:31 +00:00
|
|
|
install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime.cdi
|
2023-02-08 12:45:36 +00:00
|
|
|
install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime.legacy
|
2022-04-06 18:53:51 +00:00
|
|
|
install -m 755 -t %{buildroot}%{_bindir} nvidia-ctk
|
2024-04-24 08:47:45 +00:00
|
|
|
install -m 755 -t %{buildroot}%{_bindir} nvidia-cdi-hook
|
2019-10-22 21:36:22 +00:00
|
|
|
|
2023-01-15 00:22:37 +00:00
|
|
|
%post
|
2023-06-26 22:17:48 +00:00
|
|
|
if [ $1 -gt 1 ]; then # only on package upgrade
|
|
|
|
mkdir -p %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
|
|
|
cp -af %{_bindir}/nvidia-container-runtime-hook %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
|
|
|
fi
|
2023-01-15 00:22:37 +00:00
|
|
|
|
2019-10-22 21:36:22 +00:00
|
|
|
%posttrans
|
2023-02-07 20:10:31 +00:00
|
|
|
if [ ! -e %{_bindir}/nvidia-container-runtime-hook ]; then
|
2023-06-26 22:17:48 +00:00
|
|
|
# repairing lost file nvidia-container-runtime-hook
|
2023-02-07 20:10:31 +00:00
|
|
|
cp -avf %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit/nvidia-container-runtime-hook %{_bindir}
|
|
|
|
fi
|
2023-01-19 14:50:35 +00:00
|
|
|
rm -rf %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
2021-09-06 10:22:04 +00:00
|
|
|
ln -sf %{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-toolkit
|
2019-10-22 21:36:22 +00:00
|
|
|
|
2023-06-30 10:58:15 +00:00
|
|
|
# Generate the default config; If this file already exists no changes are made.
|
2023-08-08 11:43:45 +00:00
|
|
|
%{_bindir}/nvidia-ctk --quiet config --config-file=%{_sysconfdir}/nvidia-container-runtime/config.toml --in-place
|
2023-06-30 10:58:15 +00:00
|
|
|
|
2019-10-22 21:36:22 +00:00
|
|
|
%postun
|
2023-02-26 23:45:21 +00:00
|
|
|
if [ "$1" = 0 ]; then # package is uninstalled, not upgraded
|
|
|
|
if [ -L %{_bindir}/nvidia-container-toolkit ]; then rm -f %{_bindir}/nvidia-container-toolkit; fi
|
|
|
|
fi
|
2019-10-22 21:36:22 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
2021-09-06 10:22:04 +00:00
|
|
|
%{_bindir}/nvidia-container-runtime-hook
|
2019-10-22 21:36:22 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-05-18 11:54:46 +00:00
|
|
|
# As of 1.10.0-1 we generate the release information automatically
|
|
|
|
* %{release_date} NVIDIA CORPORATION <cudatools@nvidia.com> %{version}-%{release}
|
2022-05-18 13:16:32 +00:00
|
|
|
- See https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/%{git_commit}/CHANGELOG.md
|
2022-06-13 13:41:35 +00:00
|
|
|
- Bump libnvidia-container dependency to libnvidia-container-tools >= %{libnvidia_container_tools_version}
|
2022-07-18 12:33:04 +00:00
|
|
|
|
|
|
|
# The BASE package consists of the NVIDIA Container Runtime and the NVIDIA Container Toolkit CLI.
|
|
|
|
# This allows the package to be installed on systems where no NVIDIA Container CLI is available.
|
|
|
|
%package base
|
|
|
|
Summary: NVIDIA Container Toolkit Base
|
|
|
|
Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook <= 1.4.0-2
|
|
|
|
Provides: nvidia-container-runtime
|
|
|
|
# Since this package allows certain components of the NVIDIA Container Toolkit to be installed separately
|
|
|
|
# it conflicts with older versions of the nvidia-container-toolkit package that also provide these files.
|
|
|
|
Conflicts: nvidia-container-toolkit <= 1.10.0-1
|
|
|
|
|
|
|
|
%description base
|
|
|
|
Provides tools such as the NVIDIA Container Runtime and NVIDIA Container Toolkit CLI to enable GPU support in containers.
|
|
|
|
|
|
|
|
%files base
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/nvidia-container-runtime
|
2023-02-10 15:55:10 +00:00
|
|
|
%{_bindir}/nvidia-ctk
|
2024-04-24 08:47:45 +00:00
|
|
|
%{_bindir}/nvidia-cdi-hook
|
2023-02-10 15:55:10 +00:00
|
|
|
|
|
|
|
# The OPERATOR EXTENSIONS package consists of components that are required to enable GPU support in Kubernetes.
|
|
|
|
# This package is not distributed as part of the NVIDIA Container Toolkit RPMs.
|
|
|
|
%package operator-extensions
|
|
|
|
Summary: NVIDIA Container Toolkit Operator Extensions
|
|
|
|
Requires: nvidia-container-toolkit-base == %{version}-%{release}
|
|
|
|
|
|
|
|
%description operator-extensions
|
|
|
|
Provides tools for using the NVIDIA Container Toolkit with the GPU Operator
|
|
|
|
|
|
|
|
%files operator-extensions
|
|
|
|
%license LICENSE
|
2023-02-07 20:10:31 +00:00
|
|
|
%{_bindir}/nvidia-container-runtime.cdi
|
2023-02-08 12:45:36 +00:00
|
|
|
%{_bindir}/nvidia-container-runtime.legacy
|