app-containers/nvidia-container-toolkit: add 1.19.1

Part-of: https://codeberg.org/gentoo/gentoo/pulls/1325
Merges: https://codeberg.org/gentoo/gentoo/pulls/1325
Signed-off-by: Huang Rui <vowstar@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
Huang Rui
2026-07-06 06:38:18 -07:00
committed by Yixun Lan
parent 89c5f97521
commit f27829c942
2 changed files with 66 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
DIST nvidia-container-toolkit-1.18.0.tar.gz 5752931 BLAKE2B 0ac6d294b80ea6cffd6d9fc4794e0b4048da425de7d115de645afb3a585e4862e42e2bf092f2333312ea2e117db1b0d488d51aab986d96c52e008dcc423e6b02 SHA512 5cfe75b385ae9950c7668ffca540e9d5c1ce770dd8d786314e4145463610b5ee3c4a2dc541df8fee203a9c0300380d71b2ba196e0796d4592d6bfccc7730aa38
DIST nvidia-container-toolkit-1.19.0.tar.gz 37605698 BLAKE2B 1515ccecae03f90b20446a49db76b09772215faac83c45e4fb44daf8fc2696dad98d026143a22cce0cadecb462767d381f47696c651a639d077509b61d8936be SHA512 5d7b08af43ec8e82f2dc1c1ff1eb5eb9451cbe69add6d58d721d59b5da35d008eaa37463d615ae742b50d4e9e12ad6e02dd3d5eb03b83cc8717b18fa7f5b12b9
DIST nvidia-container-toolkit-1.19.1.tar.gz 7162427 BLAKE2B 3d1ae036ca077a1f525809af753eb2e3152b15ab42a8580d717b986c9be9e1a76cd3e7e0e57b509a5ee288c7c99e4f085ef81e64a7417366bd7e5a21a3751dfc SHA512 4524ab3813d7819b2249aec9b7af6f4053f2f7119ebf23dfa58c9566eafd29d1890183a3126030062cbd35944c388b4469a3493fb774ee96b43af15d0608b40e

View File

@@ -0,0 +1,65 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
EGO_PN="github.com/NVIDIA/${PN}"
inherit go-module
DESCRIPTION="NVIDIA container runtime toolkit"
HOMEPAGE="https://github.com/NVIDIA/nvidia-container-toolkit"
if [[ "${PV}" == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git"
else
SRC_URI="
https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/${PN}-${PV/_rc/-rc.}"
KEYWORDS="~amd64"
fi
LICENSE="Apache-2.0"
SLOT="0/${PV}"
# Some tests may require specific environmental setups or additional hardware.
RESTRICT="test" # Bug 831702
# Bug 950233 version should not be newer than libnvidia-container
RDEPEND="
~sys-libs/libnvidia-container-${PV}
"
# go.mod requires a newer Go than go-module.eclass guarantees (bug 976194)
BDEPEND=">=dev-lang/go-1.25.0"
PATCHES=(
"${FILESDIR}/${PN}-1.19.0-no-prestrip.patch"
)
src_compile() {
emake binaries
}
src_install() {
dobin nvidia-cdi-hook \
nvidia-container-runtime \
nvidia-container-runtime.cdi \
nvidia-container-runtime.legacy \
nvidia-container-runtime-hook \
nvidia-ctk
insinto "/etc/nvidia-container-runtime"
doins "${FILESDIR}/config.toml"
}
pkg_postinst() {
elog "Your docker or containerd (if applicable) service may need restart"
elog "after install this package:"
elog "OpenRC: rc-service containerd restart; rc-service docker restart"
elog "systemd: systemctl restart containerd; systemctl restart docker"
elog "You may need to edit your /etc/nvidia-container-runtime/config.toml"
elog "file before running ${PN} for the first time."
elog "For details, please see the NVIDIA docker manual page."
}