diff options
author | Huang Rui <vowstar@gmail.com> | 2022-07-08 12:50:09 +0800 |
---|---|---|
committer | Huang Rui <vowstar@gmail.com> | 2022-07-08 12:50:09 +0800 |
commit | f5f17e23543faf23a2f86d066f733807b450ab77 (patch) | |
tree | b91f4558107e0473558ef843f7017c28c3fb47f3 /app-containers | |
parent | app-containers/nvidia-container-toolkit: add 1.10.0 (diff) | |
download | guru-f5f17e23543faf23a2f86d066f733807b450ab77.tar.gz guru-f5f17e23543faf23a2f86d066f733807b450ab77.tar.bz2 guru-f5f17e23543faf23a2f86d066f733807b450ab77.zip |
app-containers/nvidia-container-toolkit: add 9999
Signed-off-by: Huang Rui <vowstar@gmail.com>
Diffstat (limited to 'app-containers')
-rw-r--r-- | app-containers/nvidia-container-toolkit/nvidia-container-toolkit-9999.ebuild | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/app-containers/nvidia-container-toolkit/nvidia-container-toolkit-9999.ebuild b/app-containers/nvidia-container-toolkit/nvidia-container-toolkit-9999.ebuild new file mode 100644 index 000000000..e5407673e --- /dev/null +++ b/app-containers/nvidia-container-toolkit/nvidia-container-toolkit-9999.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2022 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 + EGIT_REPO_URI="https://github.com/NVIDIA/${PN}.git" + inherit git-r3 + + src_unpack() { + git-r3_src_unpack + go-module_live_vendor + } +else + SRC_URI=" + https://github.com/NVIDIA/${PN}/archive/v${PV/_rc/-rc.}.tar.gz -> ${P}.tar.gz + https://media.githubusercontent.com/media/vowstar/distfiles/main/${P}-deps.tar.xz + " + S="${WORKDIR}/${PN}-${PV/_rc/-rc.}" + KEYWORDS="~amd64" +fi + +LICENSE="Apache-2.0" +SLOT="0" + +IUSE="" + +RDEPEND=" + sys-libs/libnvidia-container +" + +DEPEND="${RDEPEND}" + +BDEPEND=" + app-arch/unzip + sys-devel/make +" + +src_compile() { + emake binaries +} + +src_install() { + dobin "${PN}" + into "/usr/bin" + dosym "${PN}" "/usr/bin/nvidia-container-runtime-hook" + insinto "/etc/nvidia-container-runtime" + doins "${FILESDIR}/config.toml" +} + +pkg_postinst() { + elog "Your docker service must restart after install this package." + elog "OpenRC: sudo rc-service docker restart" + elog "systemd: sudo 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." +} |