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
|
2024-04-03 14:27:05 +00:00
|
|
|
pkgver=1.14.6
|
2023-07-04 15:10:30 +00:00
|
|
|
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
|
2024-04-03 14:27:05 +00:00
|
|
|
_libcap=2.44-1
|
2022-08-31 18:52:45 +00:00
|
|
|
|
2024-04-03 14:27:05 +00:00
|
|
|
source="https://nvidia.github.io/libnvidia-container/stable/deb/amd64/libnvidia-container1_"$_nv_ver"_amd64.deb
|
|
|
|
https://nvidia.github.io/libnvidia-container/stable/deb/amd64/libnvidia-container-tools_"$_nv_ver"_amd64.deb
|
|
|
|
https://nvidia.github.io/libnvidia-container/stable/deb/amd64/nvidia-container-toolkit_"$_nv_ver"_amd64.deb
|
2022-09-06 11:30:04 +00:00
|
|
|
http://deb.debian.org/debian/pool/main/libc/libcap2/libcap2_"$_libcap"_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
|
|
|
|
|
|
|
|
# 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="
|
2024-04-03 14:27:05 +00:00
|
|
|
ac73361c10498cdb15e6facbc78867c576fe7a79e6e41e85eed57a24f49d35ec4d21663777549e30b62601e463a0a62e28a219daae13cf20fa9ac7b64bbc9daa libnvidia-container1_1.14.6-1_amd64.deb
|
|
|
|
08697b2133f198b056b6b5aade64574ee1e40ddbeaa5d73aa7b42642c6ac67a99ad8cc4a24465ef226a5596ddfed30fcf790ffe57d351c433869486269ba3ea3 libnvidia-container-tools_1.14.6-1_amd64.deb
|
|
|
|
bc8aaae2f6c7f93d307a3c11fe77db2b0a4dbc59b4c4ab46d4d655ee522edc6d0b2882b08034aaf5b007d889d661e368d28a379c53605c7da788660b4eba86f4 nvidia-container-toolkit_1.14.6-1_amd64.deb
|
|
|
|
cc9109cdcf51dc40db732e10ac3eda7e4ac73299ad51d2ec619d7f4cff3f0311be0937530d2175e5486c393bc9e91c709072094fad510573785739afaad831f1 libcap2_2.44-1_amd64.deb
|
2022-09-06 11:30:04 +00:00
|
|
|
040ac2e3f58549dc09e5bce0d694e4be2f6aae736014bf0ee90042646562d5f1ef1f5990eb9f2c2a2fdf504587b82f4aa0eb99d04c5d3e407670e4012e3edd4e config.toml
|
2023-10-05 16:46:40 +00:00
|
|
|
0f150ea59b2372bf3ef60e657142b19f46500d1c70cb179d37ce117d6b03e86427dbf356873affb7639e082a07f852a922ae3aea4a8f8885640e43675c4e4add oci-nvidia-hook.json
|
2023-07-04 15:10:30 +00:00
|
|
|
"
|