2022-08-31 13:51:59 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
pkgname=nvidia-container-toolkit
|
2023-07-04 15:10:30 +00:00
|
|
|
pkgver=1.13.2
|
|
|
|
pkgrel=0
|
2022-09-06 11:30:04 +00:00
|
|
|
pkgdesc="NVIDIA Container toolkit incl. cri hooks"
|
|
|
|
url="https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html"
|
|
|
|
arch="x86_64"
|
|
|
|
license="Apache"
|
|
|
|
makedepends="xz"
|
|
|
|
depends="glibc-bin nvidia-drivers"
|
|
|
|
options="!check !tracedeps"
|
2022-08-31 13:51:59 +00:00
|
|
|
|
2022-09-06 11:30:04 +00:00
|
|
|
_nv_ver="$pkgver"-1
|
|
|
|
_libcap=2.25-2
|
|
|
|
_libseccomp=2.3.3-4
|
2022-08-31 18:52:45 +00:00
|
|
|
|
2022-09-06 11:30:04 +00:00
|
|
|
source="https://nvidia.github.io/libnvidia-container/stable/debian10/amd64/libnvidia-container1_"$_nv_ver"_amd64.deb
|
|
|
|
https://nvidia.github.io/libnvidia-container/stable/debian10/amd64/libnvidia-container-tools_"$_nv_ver"_amd64.deb
|
|
|
|
https://nvidia.github.io/libnvidia-container/stable/debian10/amd64/nvidia-container-toolkit_"$_nv_ver"_amd64.deb
|
|
|
|
http://deb.debian.org/debian/pool/main/libc/libcap2/libcap2_"$_libcap"_amd64.deb
|
|
|
|
http://deb.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_"$_libseccomp"_amd64.deb
|
|
|
|
config.toml
|
|
|
|
oci-nvidia-hook.json
|
|
|
|
"
|
2022-08-31 13:51:59 +00:00
|
|
|
|
|
|
|
build() {
|
2022-09-06 11:30:04 +00:00
|
|
|
return 0
|
2022-08-31 13:51:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-09-06 11:30:04 +00:00
|
|
|
mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/glibc-compat/lib/nvidia
|
|
|
|
|
|
|
|
# libnvidia-container1
|
|
|
|
ar -x "$srcdir"/libnvidia-container1_"$_nv_ver"_amd64.deb && tar xfJ data.tar.xz
|
|
|
|
mv usr/lib/x86_64-linux-gnu/* "$pkgdir"/usr/glibc-compat/lib/nvidia
|
|
|
|
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
|
|
|
|
|
|
# libnvidia-container-tools
|
|
|
|
ar -x "$srcdir"/libnvidia-container-tools_"$_nv_ver"_amd64.deb && tar xfJ data.tar.xz
|
|
|
|
mv usr/bin/nvidia-container-cli "$pkgdir"/usr/bin
|
|
|
|
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
|
|
|
|
|
|
# nvidia-container-toolkit
|
|
|
|
ar -x "$srcdir"/nvidia-container-toolkit_"$_nv_ver"_amd64.deb && tar xfJ data.tar.xz
|
|
|
|
mv usr/bin/nvidia* "$pkgdir"/usr/bin
|
|
|
|
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
|
|
|
|
|
|
# Add dependencies which also need to be compiled against glibc: libcap, libseccomp
|
|
|
|
# libcap
|
|
|
|
ar -x "$srcdir"/libcap2_"$_libcap"_amd64.deb && tar xfJ data.tar.xz
|
|
|
|
mv lib/x86_64-linux-gnu/libcap.so.* "$pkgdir"/usr/glibc-compat/lib
|
|
|
|
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
|
|
|
|
|
|
|
# libseccomp
|
|
|
|
ar -x "$srcdir"/libseccomp2_"$_libseccomp"_amd64.deb && tar xfJ data.tar.xz
|
|
|
|
mv usr/lib/x86_64-linux-gnu/libseccomp.so.* "$pkgdir"/usr/glibc-compat/lib
|
|
|
|
rm -rf control.tar.xz data.tar.xz debian-binary usr
|
2022-08-31 13:51:59 +00:00
|
|
|
|
2022-09-06 11:30:04 +00:00
|
|
|
# Now lets patch the elf binaries to fix library paths and order
|
|
|
|
doas apk add patchelf@edge-community
|
|
|
|
patchelf --remove-rpath "$pkgdir"/usr/bin/nvidia-container-cli
|
|
|
|
patchelf --remove-rpath "$pkgdir"/usr/glibc-compat/lib/nvidia/libnvidia-container.so.1
|
2022-08-31 13:51:59 +00:00
|
|
|
|
2022-09-06 11:30:04 +00:00
|
|
|
# Install our runtime config and oci hook
|
|
|
|
install -Dm644 "$srcdir"/oci-nvidia-hook.json "$pkgdir"/usr/share/containers/oci/hooks.d/oci-nvidia-hook.json
|
|
|
|
install -Dm644 config.toml "$pkgdir"/etc/nvidia-container-runtime/config.toml
|
2022-08-31 13:51:59 +00:00
|
|
|
}
|
|
|
|
|
2023-07-04 15:10:30 +00:00
|
|
|
sha512sums="
|
|
|
|
0edd50e9d42d345bcc26410752ac50425a5806144b0fdd4f6eea07f62501a325a3f58e74d68b6bb2a834b33977ddcc86723b1d96c4ae9664827ad86b4756172b libnvidia-container1_1.13.2-1_amd64.deb
|
|
|
|
3d61c5e610402344411f40db7b9da090b4de467f170779eac7fd8787bd5c30035128196b265a55af5ddadee704056dbcdf30b5cfb0ed72e90ea307db25285b1d libnvidia-container-tools_1.13.2-1_amd64.deb
|
|
|
|
f15af5460823667476e8b788708d1b76e81b73e99e0c6c9a045c830160ab2bb78988de1b4ad1963656f590faa1c5ee415b951275704fd77849d16a0ef712ed4a nvidia-container-toolkit_1.13.2-1_amd64.deb
|
2022-09-06 11:30:04 +00:00
|
|
|
694a3ec64ef3056d5874ff03b889b868c294bccb16506468fdf1c289fe3aaadc2da25a5934de653af9633a5d993d2bb21491d84b3b2e2529e6b31d92c78a2228 libcap2_2.25-2_amd64.deb
|
|
|
|
5a4eaa96e6e774948889909d618a8ed44a82f649cbba11622dc7b4478098bea006995d5a5a60ca026a57b76ad866d1e2c6caebd154a26eb6bd7e15291b558057 libseccomp2_2.3.3-4_amd64.deb
|
|
|
|
040ac2e3f58549dc09e5bce0d694e4be2f6aae736014bf0ee90042646562d5f1ef1f5990eb9f2c2a2fdf504587b82f4aa0eb99d04c5d3e407670e4012e3edd4e config.toml
|
2022-10-03 16:41:29 +00:00
|
|
|
cf5673231d1862e3ec03f792cddf54ff27237656f762c3f42b6d7e1584de2201c487861ac399ab26951b5dbf3e3cd9b4451dbf61f02b55e0991889b507319764 oci-nvidia-hook.json
|
2023-07-04 15:10:30 +00:00
|
|
|
"
|