Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: nvidia-docker-2.6.0
@ 2021-09-22 20:56 quentin-z80
  2021-10-15 16:39 ` [PR PATCH] [Updated] " quentin-z80
                   ` (46 more replies)
  0 siblings, 47 replies; 48+ messages in thread
From: quentin-z80 @ 2021-09-22 20:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

There is a new pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.6.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 9559 bytes --]

From b57818348c64624ceee076e5becf08d9da10a847 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:28:42 -0700
Subject: [PATCH 1/4] New package: libnvidia-container-1.5.1

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 .../patches/fix_nvidia-modprobe.mk.patch      | 11 ++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 5 files changed, 72 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 6f250a63f5d0..5d182b4e9d5f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4023,3 +4023,4 @@ libmt32emu.so.2 libmt32emu-2.5.1_1
 libqrtr-glib.so.0 libqrtr-glib-1.0.0_1
 libstemmer.so.2 libstemmer-2.1.0_1
 libdecor-0.so.0 libdecor-0.1.0_1
+libnvidia-container.so.1 libnvidia-container-1.5.1_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..59c4f83ec4b9
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile  2021-07-25 09:30:29.172126492 -0700
++++ b/Makefile  2021-07-25 10:30:39.601936591 -0700
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -123,7 +123,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch b/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
new file mode 100644
index 000000000000..8b3287f97279
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
@@ -0,0 +1,11 @@
+--- a/mk/nvidia-modprobe.mk  2021-07-25 09:25:03.857882583 -0700
++++ b/mk/nvidia-modprobe.mk  2021-07-25 09:25:29.586139143 -0700
+@@ -6,7 +6,7 @@
+
+ ##### Source definitions #####
+
+-VERSION        := 450.57
++VERSION        := 470.63.01
+ PREFIX         := nvidia-modprobe-$(VERSION)
+ URL            := https://github.com/NVIDIA/nvidia-modprobe/archive/$(VERSION).tar.gz
+
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..26aeee3acc0f
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.5.1
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=b12e1190df03875547628a776f97efe478fac77aa31a0fadfbea10df3bc2dc8d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 7f496d6b22d39cbd5013e5e8e5ebafa4174e5e04 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:05 -0700
Subject: [PATCH 2/4] New package: nvidia-container-toolkit-1.5.1

---
 srcpkgs/nvidia-container-toolkit/template | 38 +++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..9b1de64e595d
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,38 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.5.1
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum="51d6f2fa0e740d7581f6c632875bb87bafc2351ba32830df11bb7cb19d87b763"
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "${pkgname}" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 5cb6d10cdf82506803ceac28f7833c7a19f4b21f Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:13 -0700
Subject: [PATCH 3/4] New package: nvidia-container-runtime-3.5.0

---
 srcpkgs/nvidia-container-runtime/template | 27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-runtime/template

diff --git a/srcpkgs/nvidia-container-runtime/template b/srcpkgs/nvidia-container-runtime/template
new file mode 100644
index 000000000000..d47bfce80a45
--- /dev/null
+++ b/srcpkgs/nvidia-container-runtime/template
@@ -0,0 +1,27 @@
+# Template file for 'nvidia-container-runtime'
+pkgname=nvidia-container-runtime
+version=3.5.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+makedepends="libseccomp-devel"
+depends="libseccomp nvidia-container-toolkit"
+short_desc="Modified version of runc adding a custom pre-start hook"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-runtime/"
+distfiles="https://github.com/NVIDIA/nvidia-container-runtime/archive/v${version}.tar.gz"
+checksum="4985efe4488e441d0e4910cc7eb2046176db063e5bbe2e0542a7c08d5c5e7d34"
+
+pre_build() {
+	mkdir -p .gopath/src
+	ln -rTsf $PWD/src .gopath/src/${pkgname}
+}
+
+do_build() {
+	make build
+}
+
+do_install() {
+	vbin nvidia-container-runtime
+}

From 54763957c9c3d6b4b5cedc594f2170f26d3d4f77 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:17 -0700
Subject: [PATCH 4/4] New package: nvidia-docker-2.6.0

---
 srcpkgs/nvidia-docker/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..269a0ab7443c
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,22 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.6.0
+revision=1
+archs="x86_64"
+wrksrc="${pkgname}-${version}"
+depends="nvidia-container-toolkit libnvidia-container nvidia-container-runtime docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum="a2f41b91770e45d3f7e6d361be720573a20e88ea33d4f8c7984b6b0cfdc57214"
+
+pre_install() {
+	vsed -i nvidia-docker -e "s;@VERSION@;${version};"
+}
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 /etc/docker
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.6.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
@ 2021-10-15 16:39 ` quentin-z80
  2021-11-11 23:16 ` quentin-z80
                   ` (45 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-10-15 16:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.6.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 9554 bytes --]

From fad4375a8d42fe4db354d03367f41fd3b90268ca Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:28:42 -0700
Subject: [PATCH 1/4] New package: libnvidia-container-1.5.1

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 .../patches/fix_nvidia-modprobe.mk.patch      | 11 ++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 5 files changed, 72 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 6b97d658c44a..7ebb390b1895 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4031,3 +4031,4 @@ libqrtr-glib.so.0 libqrtr-glib-1.0.0_1
 libstemmer.so.2 libstemmer-2.1.0_1
 libdecor-0.so.0 libdecor-0.1.0_1
 libavif.so.12 libavif-0.9.2_1
+libnvidia-container.so.1 libnvidia-container-1.5.1_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..59c4f83ec4b9
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile  2021-07-25 09:30:29.172126492 -0700
++++ b/Makefile  2021-07-25 10:30:39.601936591 -0700
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -123,7 +123,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch b/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
new file mode 100644
index 000000000000..8b3287f97279
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
@@ -0,0 +1,11 @@
+--- a/mk/nvidia-modprobe.mk  2021-07-25 09:25:03.857882583 -0700
++++ b/mk/nvidia-modprobe.mk  2021-07-25 09:25:29.586139143 -0700
+@@ -6,7 +6,7 @@
+
+ ##### Source definitions #####
+
+-VERSION        := 450.57
++VERSION        := 470.63.01
+ PREFIX         := nvidia-modprobe-$(VERSION)
+ URL            := https://github.com/NVIDIA/nvidia-modprobe/archive/$(VERSION).tar.gz
+
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..26aeee3acc0f
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.5.1
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=b12e1190df03875547628a776f97efe478fac77aa31a0fadfbea10df3bc2dc8d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 664ea1fd3a9def9d0bec1c545c93630badec2351 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:05 -0700
Subject: [PATCH 2/4] New package: nvidia-container-toolkit-1.5.1

---
 srcpkgs/nvidia-container-toolkit/template | 38 +++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..9b1de64e595d
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,38 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.5.1
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum="51d6f2fa0e740d7581f6c632875bb87bafc2351ba32830df11bb7cb19d87b763"
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "${pkgname}" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 698b62692e338ac825078ca997fa1e552f978e4f Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:13 -0700
Subject: [PATCH 3/4] New package: nvidia-container-runtime-3.5.0

---
 srcpkgs/nvidia-container-runtime/template | 27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-runtime/template

diff --git a/srcpkgs/nvidia-container-runtime/template b/srcpkgs/nvidia-container-runtime/template
new file mode 100644
index 000000000000..d47bfce80a45
--- /dev/null
+++ b/srcpkgs/nvidia-container-runtime/template
@@ -0,0 +1,27 @@
+# Template file for 'nvidia-container-runtime'
+pkgname=nvidia-container-runtime
+version=3.5.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+makedepends="libseccomp-devel"
+depends="libseccomp nvidia-container-toolkit"
+short_desc="Modified version of runc adding a custom pre-start hook"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-runtime/"
+distfiles="https://github.com/NVIDIA/nvidia-container-runtime/archive/v${version}.tar.gz"
+checksum="4985efe4488e441d0e4910cc7eb2046176db063e5bbe2e0542a7c08d5c5e7d34"
+
+pre_build() {
+	mkdir -p .gopath/src
+	ln -rTsf $PWD/src .gopath/src/${pkgname}
+}
+
+do_build() {
+	make build
+}
+
+do_install() {
+	vbin nvidia-container-runtime
+}

From f0367f9af595ef9f9caf9e27a672c4af6c60e40a Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:17 -0700
Subject: [PATCH 4/4] New package: nvidia-docker-2.6.0

---
 srcpkgs/nvidia-docker/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..269a0ab7443c
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,22 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.6.0
+revision=1
+archs="x86_64"
+wrksrc="${pkgname}-${version}"
+depends="nvidia-container-toolkit libnvidia-container nvidia-container-runtime docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum="a2f41b91770e45d3f7e6d361be720573a20e88ea33d4f8c7984b6b0cfdc57214"
+
+pre_install() {
+	vsed -i nvidia-docker -e "s;@VERSION@;${version};"
+}
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 /etc/docker
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.6.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
  2021-10-15 16:39 ` [PR PATCH] [Updated] " quentin-z80
@ 2021-11-11 23:16 ` quentin-z80
  2021-11-24  0:26 ` quentin-z80
                   ` (44 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-11-11 23:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.6.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 9615 bytes --]

From fc9c4a12372f088446e03c1ba8192f6c13165639 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:28:42 -0700
Subject: [PATCH 1/4] New package: libnvidia-container-1.5.1

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 .../patches/fix_nvidia-modprobe.mk.patch      | 11 ++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 5 files changed, 73 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index fd78e1e33c3f..ec46ef2ddfcf 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4062,3 +4062,5 @@ libomalloc-0.9.6.so singular-4.2.1_1
 libsingular_resources-4.2.1.so singular-4.2.1_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
 libm4rie-0.0.20200125.so m4rie-20200125_1
+libavif.so.12 libavif-0.9.2_1
+libnvidia-container.so.1 libnvidia-container-1.5.1_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..59c4f83ec4b9
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile  2021-07-25 09:30:29.172126492 -0700
++++ b/Makefile  2021-07-25 10:30:39.601936591 -0700
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -123,7 +123,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch b/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
new file mode 100644
index 000000000000..8b3287f97279
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_nvidia-modprobe.mk.patch
@@ -0,0 +1,11 @@
+--- a/mk/nvidia-modprobe.mk  2021-07-25 09:25:03.857882583 -0700
++++ b/mk/nvidia-modprobe.mk  2021-07-25 09:25:29.586139143 -0700
+@@ -6,7 +6,7 @@
+
+ ##### Source definitions #####
+
+-VERSION        := 450.57
++VERSION        := 470.63.01
+ PREFIX         := nvidia-modprobe-$(VERSION)
+ URL            := https://github.com/NVIDIA/nvidia-modprobe/archive/$(VERSION).tar.gz
+
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..26aeee3acc0f
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.5.1
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=b12e1190df03875547628a776f97efe478fac77aa31a0fadfbea10df3bc2dc8d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 2d3e15c98fe58d184b7e915e76ba01dc0d9718c0 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:05 -0700
Subject: [PATCH 2/4] New package: nvidia-container-toolkit-1.5.1

---
 srcpkgs/nvidia-container-toolkit/template | 38 +++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..9b1de64e595d
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,38 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.5.1
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum="51d6f2fa0e740d7581f6c632875bb87bafc2351ba32830df11bb7cb19d87b763"
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "${pkgname}" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 7da03d98f670157e14311c41b62b064e85be74d4 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:13 -0700
Subject: [PATCH 3/4] New package: nvidia-container-runtime-3.5.0

---
 srcpkgs/nvidia-container-runtime/template | 27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-runtime/template

diff --git a/srcpkgs/nvidia-container-runtime/template b/srcpkgs/nvidia-container-runtime/template
new file mode 100644
index 000000000000..d47bfce80a45
--- /dev/null
+++ b/srcpkgs/nvidia-container-runtime/template
@@ -0,0 +1,27 @@
+# Template file for 'nvidia-container-runtime'
+pkgname=nvidia-container-runtime
+version=3.5.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+makedepends="libseccomp-devel"
+depends="libseccomp nvidia-container-toolkit"
+short_desc="Modified version of runc adding a custom pre-start hook"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-runtime/"
+distfiles="https://github.com/NVIDIA/nvidia-container-runtime/archive/v${version}.tar.gz"
+checksum="4985efe4488e441d0e4910cc7eb2046176db063e5bbe2e0542a7c08d5c5e7d34"
+
+pre_build() {
+	mkdir -p .gopath/src
+	ln -rTsf $PWD/src .gopath/src/${pkgname}
+}
+
+do_build() {
+	make build
+}
+
+do_install() {
+	vbin nvidia-container-runtime
+}

From f85d1b371416e37ee9f3d9942293f0bc02fb3ecb Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Sep 2021 13:30:17 -0700
Subject: [PATCH 4/4] New package: nvidia-docker-2.6.0

---
 srcpkgs/nvidia-docker/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..269a0ab7443c
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,22 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.6.0
+revision=1
+archs="x86_64"
+wrksrc="${pkgname}-${version}"
+depends="nvidia-container-toolkit libnvidia-container nvidia-container-runtime docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum="a2f41b91770e45d3f7e6d361be720573a20e88ea33d4f8c7984b6b0cfdc57214"
+
+pre_install() {
+	vsed -i nvidia-docker -e "s;@VERSION@;${version};"
+}
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 /etc/docker
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.6.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
  2021-10-15 16:39 ` [PR PATCH] [Updated] " quentin-z80
  2021-11-11 23:16 ` quentin-z80
@ 2021-11-24  0:26 ` quentin-z80
  2021-11-25  0:00 ` [PR PATCH] [Updated] New package: nvidia-docker-2.7.0 quentin-z80
                   ` (43 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-11-24  0:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.6.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 6970 bytes --]

From 03556e2dd5a71059cbea49fe3709c24bb23dc842 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.6.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index ab865cc085d2..3829c233c9d6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4070,3 +4070,4 @@ libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
 libm4rie-0.0.20200125.so m4rie-20200125_1
 libptytty.so.0 libptytty-2.0_1
+libnvidia-container.so.1 libnvidia-container-1.6.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..0774a7f58717
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=05c15d567e91009e5b37b076bcecdc0320052641cb7b93675908c2d422f6c9d2
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 79a1be4bffdc869b057b2b7e77a4ce5652c3523e Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:25:54 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.6.0

---
 srcpkgs/nvidia-container-toolkit/template | 39 +++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..a88e77fa1a21
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,39 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=09f9fa8b7fe0e374803e78ebdd5f6d108130158cce83da0ac89885e1e6e7ecaf
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "${pkgname}" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From b5ed9a0276f09329586ea74f5c10a8154933b12a Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:26:01 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.7.0

---
 srcpkgs/nvidia-docker/template | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..5a06c1778b51
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,11 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.7.0
+revision=1
+archs="x86_64"
+build_style=meta
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Public Domain"
+homepage="https://github.com/NVIDIA/nvidia-docker"

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.7.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (2 preceding siblings ...)
  2021-11-24  0:26 ` quentin-z80
@ 2021-11-25  0:00 ` quentin-z80
  2021-11-25  0:03 ` quentin-z80
                   ` (42 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-11-25  0:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.7.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7611 bytes --]

From 03556e2dd5a71059cbea49fe3709c24bb23dc842 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.6.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index ab865cc085d2..3829c233c9d6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4070,3 +4070,4 @@ libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
 libm4rie-0.0.20200125.so m4rie-20200125_1
 libptytty.so.0 libptytty-2.0_1
+libnvidia-container.so.1 libnvidia-container-1.6.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..0774a7f58717
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=05c15d567e91009e5b37b076bcecdc0320052641cb7b93675908c2d422f6c9d2
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 0c078534b91c6f6cd5cdd8e44ee9033843e0c8f4 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 24 Nov 2021 15:59:55 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.6.0

---
 srcpkgs/nvidia-container-toolkit/template | 51 +++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..13b9cee17cec
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,51 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=09f9fa8b7fe0e374803e78ebdd5f6d108130158cce83da0ac89885e1e6e7ecaf
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+        GOPATH="${PWD}/.gopath" \
+        go build -v \
+                -buildmode=pie \
+                -gcflags "all=-trimpath=${PWD}" \
+                -asmflags "all=-trimpath=${PWD}" \
+                -ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+                -o "nvidia-container-runtime" \
+                "${PWD}/cmd/nvidia-container-runtime"
+
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 046429d720073fc6c7c6dd16268a8f01d73b0bed Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 24 Nov 2021 16:00:04 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.7.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..d378180e1662
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.7.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1c42bf7717ad3f734015087b9125fa96aca2e53656821d3bd8eab4adb23dfd72
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.7.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (3 preceding siblings ...)
  2021-11-25  0:00 ` [PR PATCH] [Updated] New package: nvidia-docker-2.7.0 quentin-z80
@ 2021-11-25  0:03 ` quentin-z80
  2021-12-20 22:23 ` quentin-z80
                   ` (41 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-11-25  0:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.7.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7611 bytes --]

From af8e5d70bc9f01af76d10a063ddb3cc113891a80 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.6.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 3199833de6cd..f02bd2e5984c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4070,3 +4070,4 @@ libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
 libm4rie-0.0.20200125.so m4rie-20200125_1
 libptytty.so.0 libptytty-2.0_1
+libnvidia-container.so.1 libnvidia-container-1.6.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..0774a7f58717
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=05c15d567e91009e5b37b076bcecdc0320052641cb7b93675908c2d422f6c9d2
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 7192de44fcfe05ec9588ab5e5ac86ebdafac83f0 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 24 Nov 2021 15:59:55 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.6.0

---
 srcpkgs/nvidia-container-toolkit/template | 51 +++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..13b9cee17cec
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,51 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=09f9fa8b7fe0e374803e78ebdd5f6d108130158cce83da0ac89885e1e6e7ecaf
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+        GOPATH="${PWD}/.gopath" \
+        go build -v \
+                -buildmode=pie \
+                -gcflags "all=-trimpath=${PWD}" \
+                -asmflags "all=-trimpath=${PWD}" \
+                -ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+                -o "nvidia-container-runtime" \
+                "${PWD}/cmd/nvidia-container-runtime"
+
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 8528e22fc7c899014155f100536ab593a7c5fc44 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 24 Nov 2021 16:00:04 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.7.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..d378180e1662
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.7.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1c42bf7717ad3f734015087b9125fa96aca2e53656821d3bd8eab4adb23dfd72
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.7.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (4 preceding siblings ...)
  2021-11-25  0:03 ` quentin-z80
@ 2021-12-20 22:23 ` quentin-z80
  2021-12-22  4:58 ` quentin-z80
                   ` (40 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-12-20 22:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.7.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7662 bytes --]

From 1c6ca4e41d1bfdf0b2ded8dc105b11b34b777478 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.6.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 82bfd5c90471..141dd78a4f2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4092,3 +4092,4 @@ libkaddressbookmergelibprivate.so.5 kdepim-addons-21.08.3_1
 libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
+libnvidia-container.so.1 libnvidia-container-1.6.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..0774a7f58717
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=05c15d567e91009e5b37b076bcecdc0320052641cb7b93675908c2d422f6c9d2
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From f12421508803001da94e9c404fef46a8ff190569 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 24 Nov 2021 15:59:55 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.6.0

---
 srcpkgs/nvidia-container-toolkit/template | 51 +++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..13b9cee17cec
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,51 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=09f9fa8b7fe0e374803e78ebdd5f6d108130158cce83da0ac89885e1e6e7ecaf
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+        GOPATH="${PWD}/.gopath" \
+        go build -v \
+                -buildmode=pie \
+                -gcflags "all=-trimpath=${PWD}" \
+                -asmflags "all=-trimpath=${PWD}" \
+                -ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+                -o "nvidia-container-runtime" \
+                "${PWD}/cmd/nvidia-container-runtime"
+
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From b3fdc2954b5ab212608364bf2dd0045c6adcfbe2 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 24 Nov 2021 16:00:04 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.7.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..d378180e1662
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.7.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1c42bf7717ad3f734015087b9125fa96aca2e53656821d3bd8eab4adb23dfd72
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.7.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (5 preceding siblings ...)
  2021-12-20 22:23 ` quentin-z80
@ 2021-12-22  4:58 ` quentin-z80
  2021-12-22 22:25 ` quentin-z80
                   ` (39 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-12-22  4:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.7.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7562 bytes --]

From 1c6ca4e41d1bfdf0b2ded8dc105b11b34b777478 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 23 Nov 2021 16:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.6.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 82bfd5c90471..141dd78a4f2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4092,3 +4092,4 @@ libkaddressbookmergelibprivate.so.5 kdepim-addons-21.08.3_1
 libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
+libnvidia-container.so.1 libnvidia-container-1.6.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..0774a7f58717
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=05c15d567e91009e5b37b076bcecdc0320052641cb7b93675908c2d422f6c9d2
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 79f9167910d21b3a63604bf91fe1f8edc057f9b9 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 21 Dec 2021 20:58:34 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.6.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..f87cfc915623
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.6.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=09f9fa8b7fe0e374803e78ebdd5f6d108130158cce83da0ac89885e1e6e7ecaf
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 749b29df9906e0b636ca556c7d603e859355ce8e Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Tue, 21 Dec 2021 20:58:38 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.7.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..d378180e1662
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.7.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1c42bf7717ad3f734015087b9125fa96aca2e53656821d3bd8eab4adb23dfd72
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.7.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (6 preceding siblings ...)
  2021-12-22  4:58 ` quentin-z80
@ 2021-12-22 22:25 ` quentin-z80
  2022-01-03  9:04 ` New package: nvidia-docker-2.8.0 classabbyamp
                   ` (38 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2021-12-22 22:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.7.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7562 bytes --]

From 671225a45898d4d66dc3aee79709f50c3198efed Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 82bfd5c90471..7b8557a13429 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4092,3 +4092,4 @@ libkaddressbookmergelibprivate.so.5 kdepim-addons-21.08.3_1
 libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 8264c98d363fe09bc1aac945c7ad50b2be69fb03 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 8d64a6806cbe749c747ac9040cef3100b05ca524 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:44 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (7 preceding siblings ...)
  2021-12-22 22:25 ` quentin-z80
@ 2022-01-03  9:04 ` classabbyamp
  2022-01-03 20:19 ` classabbyamp
                   ` (37 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-01-03  9:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1003951658

Comment:
I was able to build this myself, but I was unable to run the test container successfully. The output I got was:

```
$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi  
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: detection error: open failed: /usr/lib/libnvoptix.so.1: no such file or directory: unknown.
```

I have the `nvidia` package installed, and am able to run `nvidia-smi` outside of docker with no issues. Any ideas? 

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (8 preceding siblings ...)
  2022-01-03  9:04 ` New package: nvidia-docker-2.8.0 classabbyamp
@ 2022-01-03 20:19 ` classabbyamp
  2022-01-04  0:31 ` classabbyamp
                   ` (36 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-01-03 20:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1003951658

Comment:
I was able to build this myself, but I was unable to run the test container successfully. The output I got was:

```
$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi  
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: detection error: open failed: /usr/lib/libnvoptix.so.1: no such file or directory: unknown.
```

I have the `nvidia` package installed, and am able to run `nvidia-smi` outside of docker with no issues. Any ideas?

**EDIT:** seems that the nvidia package wasn't properly symlinking that sofile, should be fixed when #34836 is merged.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (9 preceding siblings ...)
  2022-01-03 20:19 ` classabbyamp
@ 2022-01-04  0:31 ` classabbyamp
  2022-01-04  0:33 ` classabbyamp
                   ` (35 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-01-04  0:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1003951658

Comment:
I was able to build this myself, ~~but I was unable to run the test container successfully.~~ 

<details>
<summary>The output I got was:</summary

<p>
$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi  
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: detection error: open failed: /usr/lib/libnvoptix.so.1: no such file or directory: unknown.
</p>

</details>

~~I have the `nvidia` package installed, and am able to run `nvidia-smi` outside of docker with no issues. Any ideas?~~


**EDIT:** seems that the nvidia package wasn't properly symlinking that sofile, should be fixed when #34836 is merged.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (10 preceding siblings ...)
  2022-01-04  0:31 ` classabbyamp
@ 2022-01-04  0:33 ` classabbyamp
  2022-01-04  1:11 ` [PR PATCH] [Updated] " quentin-z80
                   ` (34 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-01-04  0:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1003951658

Comment:
I was able to build this myself, and run the test command successfully.

<details>
<summary>Previous comment (outdated)</summary

I was able to build this myself, but I was unable to run the test container successfully. The output was:

<p>

```
$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi  
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: detection error: open failed: /usr/lib/libnvoptix.so.1: no such file or directory: unknown.
```

</p>

I have the `nvidia` package installed, and am able to run `nvidia-smi` outside of docker with no issues. Any ideas?

**EDIT:** seems that the nvidia package wasn't properly symlinking that sofile, should be fixed when #34836 is merged.

</details>



^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (11 preceding siblings ...)
  2022-01-04  0:33 ` classabbyamp
@ 2022-01-04  1:11 ` quentin-z80
  2022-01-21 22:55 ` quentin-z80
                   ` (33 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-01-04  1:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7533 bytes --]

From 5af05e800acd75c81efdca4b1996b27c3ab8b6a9 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 999d3ad714b8..b1f2d40cd60f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4097,3 +4097,4 @@ libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 596a7a5658c2e0e637f1a4a33e57a4437fe83ba0 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 07961b4b9be6789a5313f8abc3506449689a429a Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:44 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (12 preceding siblings ...)
  2022-01-04  1:11 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-01-21 22:55 ` quentin-z80
  2022-01-30  0:59 ` jchook
                   ` (32 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-01-21 22:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7533 bytes --]

From 22331122860b104dbc40385145d0544d6a74aaf1 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 6fe46eaaeb05..8525c627ad0f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4100,3 +4100,4 @@ libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1
 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From e50a0540a2b4f967620024f9fd3da243f739984f Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From bd9cfc54ffc76abfd6dfecf2dc65ce35db678394 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:44 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (13 preceding siblings ...)
  2022-01-21 22:55 ` quentin-z80
@ 2022-01-30  0:59 ` jchook
  2022-01-30  3:45 ` [PR PATCH] [Updated] " quentin-z80
                   ` (31 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: jchook @ 2022-01-30  0:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

New comment by jchook on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1025020868

Comment:
Works for me! 🎉

At first I got this error:

```
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].
ERRO[0007] error waiting for container: context canceled
```

Just needed to reboot the docker daemon after installing.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (14 preceding siblings ...)
  2022-01-30  0:59 ` jchook
@ 2022-01-30  3:45 ` quentin-z80
  2022-01-30  3:53 ` quentin-z80
                   ` (30 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-01-30  3:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7507 bytes --]

From c72fd50d5c6b5372d7d42959ab0c4a645327ea35 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index edcf9daee61c..6d4003b15b40 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4103,3 +4103,4 @@ libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
 libdeflate.so.0 libdeflate-1.8_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 373202abdbd2c4b8b41505dde4784c3c4bdc0744 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 452eba8cab797ea90f4543c3d5ace671f6b10f69 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:44 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (15 preceding siblings ...)
  2022-01-30  3:45 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-01-30  3:53 ` quentin-z80
  2022-01-30  4:00 ` quentin-z80
                   ` (29 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-01-30  3:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

New comment by quentin-z80 on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1025062461

Comment:
Thanks for testing it.

Do you think it would be helpful to have a install message telling the user to restart docker or is that not really needed?

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (16 preceding siblings ...)
  2022-01-30  3:53 ` quentin-z80
@ 2022-01-30  4:00 ` quentin-z80
  2022-01-31  5:43 ` jchook
                   ` (28 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-01-30  4:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

New comment by quentin-z80 on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1025062461

Comment:
Thanks for testing it.

Does anyone here know if there should be an install message telling the user to restart docker?
I have not seen an example of another package doing this so unsure if it is really needed.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (17 preceding siblings ...)
  2022-01-30  4:00 ` quentin-z80
@ 2022-01-31  5:43 ` jchook
  2022-01-31  5:44 ` jchook
                   ` (27 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: jchook @ 2022-01-31  5:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

New comment by jchook on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1025400287

Comment:
Looks like you could add a suggestion via an `INSTALL.msg`file.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (18 preceding siblings ...)
  2022-01-31  5:43 ` jchook
@ 2022-01-31  5:44 ` jchook
  2022-01-31  5:51 ` jchook
                   ` (26 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: jchook @ 2022-01-31  5:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

New comment by jchook on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1025400287

Comment:
Looks like you could add a suggestion via an `INSTALL.msg` file.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (19 preceding siblings ...)
  2022-01-31  5:44 ` jchook
@ 2022-01-31  5:51 ` jchook
  2022-01-31 18:09 ` [PR PATCH] [Updated] " quentin-z80
                   ` (25 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: jchook @ 2022-01-31  5:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

New comment by jchook on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1025400287

Comment:
Looks like you could add a suggestion via an `INSTALL.msg` file.

EDIT: Also most importantly, thank you and others very very much for making this package.

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (20 preceding siblings ...)
  2022-01-31  5:51 ` jchook
@ 2022-01-31 18:09 ` quentin-z80
  2022-02-02  4:16 ` quentin-z80
                   ` (24 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-01-31 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7880 bytes --]

From c72fd50d5c6b5372d7d42959ab0c4a645327ea35 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index edcf9daee61c..6d4003b15b40 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4103,3 +4103,4 @@ libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
 libdeflate.so.0 libdeflate-1.8_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 373202abdbd2c4b8b41505dde4784c3c4bdc0744 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 97ed79921639ba21b85f694a5beaab96cc19d8dc Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Mon, 31 Jan 2022 10:09:32 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..3c15fe1172a1
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restared
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (21 preceding siblings ...)
  2022-01-31 18:09 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-02-02  4:16 ` quentin-z80
  2022-02-02 17:32 ` [PR REVIEW] " classabbyamp
                   ` (23 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-02-02  4:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New comment by quentin-z80 on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1027561848

Comment:
added a post install message 

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (22 preceding siblings ...)
  2022-02-02  4:16 ` quentin-z80
@ 2022-02-02 17:32 ` classabbyamp
  2022-02-02 18:51 ` [PR PATCH] [Updated] " quentin-z80
                   ` (22 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-02-02 17:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r797853049

Comment:
```suggestion
The docker service must be restarted:
```
tiny typo :)

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (23 preceding siblings ...)
  2022-02-02 17:32 ` [PR REVIEW] " classabbyamp
@ 2022-02-02 18:51 ` quentin-z80
  2022-02-02 18:51 ` [PR REVIEW] " quentin-z80
                   ` (21 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-02-02 18:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7881 bytes --]

From c72fd50d5c6b5372d7d42959ab0c4a645327ea35 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index edcf9daee61c..6d4003b15b40 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4103,3 +4103,4 @@ libkaddressbookprivate.so.5 kaddressbook-21.08.3_1
 libcodec2.so.1.0 codec2-1.0.1_1
 libx86emu.so.3 libx86emu-3.4_1
 libdeflate.so.0 libdeflate-1.8_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 373202abdbd2c4b8b41505dde4784c3c4bdc0744 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From c5b67a49a10d383257130aed25f986d4c86306dd Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 2 Feb 2022 10:51:04 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (24 preceding siblings ...)
  2022-02-02 18:51 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-02-02 18:51 ` quentin-z80
  2022-02-20 19:25 ` [PR PATCH] [Updated] " quentin-z80
                   ` (20 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-02-02 18:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

New review comment by quentin-z80 on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r797921053

Comment:
thanks, fixed

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (25 preceding siblings ...)
  2022-02-02 18:51 ` [PR REVIEW] " quentin-z80
@ 2022-02-20 19:25 ` quentin-z80
  2022-02-26  5:48 ` ryjelsum
                   ` (19 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-02-20 19:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7884 bytes --]

From 51441d2fac569cb74102d7cc078a4c6465d7e3e1 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:30 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.7.0

---
 common/shlibs                                 |  1 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 38 +++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 7c253776c381..87617d4bf72e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4111,3 +4111,4 @@ libawt_xawt.so openjdk17-jre-17.0.1+12_1
 libjava.so openjdk17-jre-17.0.1+12_1
 libjli.so openjdk17-jre-17.0.1+12_1
 libjvm.so openjdk17-jre-17.0.1+12_1
+libnvidia-container.so.1 libnvidia-container-1.7.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..045b5fdad14a
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,38 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=8229a5931c3a51dddbe4f30ff6d0b298bc80fd2b6da7d1507669f68bb1f75bf5
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From eb8b3840b930bc7a85470e500705add6c90f5710 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 22 Dec 2021 14:25:40 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.7.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..b567bab9e400
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.7.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 603898c4a19ddc45432f5135d7c56aca75225cd6 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 2 Feb 2022 10:51:04 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.8.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..416d9478670b
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.8.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=25515fb90c18a2d81a5264547f46b36b1be0815e05484727198ecea1b2a2b4a9
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (26 preceding siblings ...)
  2022-02-20 19:25 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-02-26  5:48 ` ryjelsum
  2022-02-26  6:52 ` jchook
                   ` (18 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: ryjelsum @ 2022-02-26  5:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

New comment by ryjelsum on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1051630601

Comment:
I was able to build this (from quentin-z80's nvidia-docker branch) and the associated dependencies and it's working well; got a massive performance increase in the Magic: the Gathering Online docker image that I am using, just to add my own feedback before this hits the main repository. 

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (27 preceding siblings ...)
  2022-02-26  5:48 ` ryjelsum
@ 2022-02-26  6:52 ` jchook
  2022-03-02 19:48 ` [PR PATCH] [Updated] " quentin-z80
                   ` (17 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: jchook @ 2022-02-26  6:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

New comment by jchook on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1051708936

Comment:
Is there any reason not to merge this?

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (28 preceding siblings ...)
  2022-02-26  6:52 ` jchook
@ 2022-03-02 19:48 ` quentin-z80
  2022-04-08  0:03 ` [PR PATCH] [Updated] New package: nvidia-docker-2.9.1 quentin-z80
                   ` (16 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-03-02 19:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.8.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 8063 bytes --]

From df46474a8bb5fe9b8e1dc32ab7322e95892bba93 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 2 Mar 2022 11:47:36 -0800
Subject: [PATCH 1/3] New package: libnvidia-container-1.8.1

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 4 files changed, 63 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 5096ab5dad6b..c1997f9a6e89 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4117,3 +4117,5 @@ libspatialite.so.7 libspatialite-5.0.1_1
 mod_spatialite.so.7 libspatialite-5.0.1_1
 libSvtAv1Enc.so.0 libsvt-av1-0.9.0_1
 libSvtAv1Dec.so.0 libsvt-av1-0.9.0_1
+libnvidia-container.so.1 libnvidia-container-1.8.1_1
+libnvidia-container-go.so.1 libnvidia-container-1.8.1_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..8ec185fbf18c
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.8.1
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=0ba2f3b9fa45b7369061e572195e617249aafa7f9cf32a3999d17f2a1a4b7cd6
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+        vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 2881f210ea1e3831db507a0efc17f2150ad6cdfb Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 2 Mar 2022 11:47:51 -0800
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.8.1

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..dec8bf4f2864
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.8.1
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=859c9913e450794e3f4e0b488a7315c6a41906a0ece30c91ffab43f444d8b76f
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 1c9dc4343dfc3660e3c039c18776867550cc9aab Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Wed, 2 Mar 2022 11:48:08 -0800
Subject: [PATCH 3/3] New package: nvidia-docker-2.9.1

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..d20539fb85ae
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.9.1
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=0a974c4df93bd6225e4b50ade80e0beb868928fdf6bdbca08beb7a04f70f4abd
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.9.1
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (29 preceding siblings ...)
  2022-03-02 19:48 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-04-08  0:03 ` quentin-z80
  2022-05-01 19:55 ` New package: nvidia-docker-2.10.0 nuxion
                   ` (15 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-04-08  0:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.9.1
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7595 bytes --]

From ae10ae748dfdf76ea8f6ecf3b7fcd8a0cf44510b Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Thu, 7 Apr 2022 17:02:58 -0700
Subject: [PATCH 1/3] New package: nvidia-docker-2.10.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..164ea00efc42
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.10.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1b0050c500a0d728824ea0e6abcd2d8612097e7b7031f3b2fdf587c2bc2843a8
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

From f24be0d2140bf7f2122d4033c145a6610f5ce398 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Thu, 7 Apr 2022 17:03:06 -0700
Subject: [PATCH 2/3] New package: libnvidia-container-1.9.0

---
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 3 files changed, 61 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..cb8ef5ddecf8
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=5eb7c6de853307970a53e9f65cc61be7c0ceae315c175fb0a2271c5669dbf33f
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+        vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From ef791d93d300225fcc064a76383995290d7dd9ba Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Thu, 7 Apr 2022 17:03:12 -0700
Subject: [PATCH 3/3] New package: nvidia-container-toolkit-1.9.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..19efeece1923
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=99a78af89b0140bc6c096317f3e64f58482eb7bf28d9959c1f3d40cd88765a76
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (30 preceding siblings ...)
  2022-04-08  0:03 ` [PR PATCH] [Updated] New package: nvidia-docker-2.9.1 quentin-z80
@ 2022-05-01 19:55 ` nuxion
  2022-05-07 22:20 ` [PR PATCH] [Updated] " quentin-z80
                   ` (14 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: nuxion @ 2022-05-01 19:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

New comment by nuxion on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#issuecomment-1114321007

Comment:
Hi ! I tested this package and it worked!! 
Thanks in advance for making this package available, I hope this branch will be merged soon

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (31 preceding siblings ...)
  2022-05-01 19:55 ` New package: nvidia-docker-2.10.0 nuxion
@ 2022-05-07 22:20 ` quentin-z80
  2022-05-07 22:21 ` quentin-z80
                   ` (13 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-05-07 22:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.10.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 8059 bytes --]

From ae10ae748dfdf76ea8f6ecf3b7fcd8a0cf44510b Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Thu, 7 Apr 2022 17:02:58 -0700
Subject: [PATCH 1/3] New package: nvidia-docker-2.10.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..164ea00efc42
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.10.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1b0050c500a0d728824ea0e6abcd2d8612097e7b7031f3b2fdf587c2bc2843a8
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

From dec27e49d57a04492038690ce763515a20ef1daf Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 7 May 2022 15:20:04 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.9.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..19efeece1923
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=99a78af89b0140bc6c096317f3e64f58482eb7bf28d9959c1f3d40cd88765a76
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 2fa835364fe1e8895542d9a3bd45fb396cf40d11 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 7 May 2022 15:20:20 -0700
Subject: [PATCH 3/3] New package: libnvidia-container-1.9.0

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 4 files changed, 63 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 848b488bb2d0..f3f84d7ba00d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4145,3 +4145,5 @@ librz_search.so.0.3.4 rizin-0.3.4_1
 librz_bin.so.0.3.4 rizin-0.3.4_1
 libaravis-0.8.so.0 libaravis-0.8.21_1
 libLimeSuite.so.20.10-1 LimeSuite-20.10.0_1
+libnvidia-container.so.1 libnvidia-container-1.9.0_1
+libnvidia-container-go.so.1 libnvidia-container-1.9.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..cb8ef5ddecf8
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=5eb7c6de853307970a53e9f65cc61be7c0ceae315c175fb0a2271c5669dbf33f
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+        vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (32 preceding siblings ...)
  2022-05-07 22:20 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-05-07 22:21 ` quentin-z80
  2022-06-12  1:24 ` quentin-z80
                   ` (12 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-05-07 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.10.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 8020 bytes --]

From 03b657e5bfd60e9ce9ee21084f98827bd7e49117 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Thu, 7 Apr 2022 17:02:58 -0700
Subject: [PATCH 1/3] New package: nvidia-docker-2.10.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..164ea00efc42
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.10.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1b0050c500a0d728824ea0e6abcd2d8612097e7b7031f3b2fdf587c2bc2843a8
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

From f428ccc253c53ede02cfa91a3cc49aac36715466 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 7 May 2022 15:20:04 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.9.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..19efeece1923
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=99a78af89b0140bc6c096317f3e64f58482eb7bf28d9959c1f3d40cd88765a76
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 8e339b4c8910556d172febe62f7e25d1e3a5faf3 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 7 May 2022 15:20:20 -0700
Subject: [PATCH 3/3] New package: libnvidia-container-1.9.0

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 4 files changed, 63 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 784375c7c9aa..97286fb7f31e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4169,3 +4169,5 @@ libMatrix.so root-6.24.06_1
 libThread.so root-6.24.06_1
 libTMVA.so root-6.24.06_1
 libMathCore.so root-6.24.06_1
+libnvidia-container.so.1 libnvidia-container-1.9.0_1
+libnvidia-container-go.so.1 libnvidia-container-1.9.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..cb8ef5ddecf8
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=5eb7c6de853307970a53e9f65cc61be7c0ceae315c175fb0a2271c5669dbf33f
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+        vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (33 preceding siblings ...)
  2022-05-07 22:21 ` quentin-z80
@ 2022-06-12  1:24 ` quentin-z80
  2022-06-14 18:36 ` [PR REVIEW] " classabbyamp
                   ` (11 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-12  1:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.10.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 8029 bytes --]

From 35c1f9a9b29f0daf2bf431a10ae8d022463feeab Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Thu, 7 Apr 2022 17:02:58 -0700
Subject: [PATCH 1/3] New package: nvidia-docker-2.10.0

---
 srcpkgs/nvidia-docker/INSTALL.msg |  4 ++++
 srcpkgs/nvidia-docker/template    | 17 +++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/INSTALL.msg
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/INSTALL.msg b/srcpkgs/nvidia-docker/INSTALL.msg
new file mode 100644
index 000000000000..d06e53c8f5cb
--- /dev/null
+++ b/srcpkgs/nvidia-docker/INSTALL.msg
@@ -0,0 +1,4 @@
+The docker service must be restarted:
+
+	# sv restart docker
+
diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..164ea00efc42
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.10.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=1b0050c500a0d728824ea0e6abcd2d8612097e7b7031f3b2fdf587c2bc2843a8
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

From 1e2ef75fa9cd0f9b07a621ac67350a70d1d5ab8e Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 7 May 2022 15:20:04 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.9.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..19efeece1923
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=99a78af89b0140bc6c096317f3e64f58482eb7bf28d9959c1f3d40cd88765a76
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From 324b0a5b4f11588ac0fd64a5450e705001a4339c Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 7 May 2022 15:20:20 -0700
Subject: [PATCH 3/3] New package: libnvidia-container-1.9.0

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_makefile.patch                | 21 ++++++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 4 files changed, 63 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_makefile.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 098f15bbf3e5..7e60db2907c9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,5 @@ libCore.so root-6.24.06_1
 libCore.so qtcreator-7.0.2_1
 liblowdown.so lowdown-0.11.2_1
 libjaylink.so.0 libjaylink-0.2.0_1
+libnvidia-container.so.1 libnvidia-container-1.9.0_1
+libnvidia-container-go.so.1 libnvidia-container-1.9.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_makefile.patch b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
new file mode 100644
index 000000000000..db3024c68f35
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_makefile.patch
@@ -0,0 +1,21 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -23,7 +23,7 @@
+ 
+ ##### Global definitions #####
+ 
+-export prefix      = /usr/local
++export prefix      = /usr
+ export exec_prefix = $(prefix)
+ export bindir      = $(exec_prefix)/bin
+ export libdir      = $(exec_prefix)/lib
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..cb8ef5ddecf8
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.9.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=5eb7c6de853307970a53e9f65cc61be7c0ceae315c175fb0a2271c5669dbf33f
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+        vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (36 preceding siblings ...)
  2022-06-14 18:36 ` classabbyamp
@ 2022-06-14 18:36 ` classabbyamp
  2022-06-18 17:00 ` [PR PATCH] [Updated] " quentin-z80
                   ` (8 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-06-14 18:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r897198380

Comment:
`prefix` is patched to `/usr` in `fix_makefile.patch`, is it necessary here too?

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (35 preceding siblings ...)
  2022-06-14 18:36 ` [PR REVIEW] " classabbyamp
@ 2022-06-14 18:36 ` classabbyamp
  2022-06-14 18:36 ` classabbyamp
                   ` (9 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-06-14 18:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r897185728

Comment:
I don't think this install message is necessary

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (34 preceding siblings ...)
  2022-06-12  1:24 ` quentin-z80
@ 2022-06-14 18:36 ` classabbyamp
  2022-06-14 18:36 ` classabbyamp
                   ` (10 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-06-14 18:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r897181782

Comment:
could this be done using the go build style?

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.10.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (37 preceding siblings ...)
  2022-06-14 18:36 ` classabbyamp
@ 2022-06-18 17:00 ` quentin-z80
  2022-06-18 17:46 ` [PR PATCH] [Updated] New package: nvidia-docker-2.11.0 quentin-z80
                   ` (7 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-18 17:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.10.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7419 bytes --]

From 70238fc05c9bd8cbd258382dc0357aa443578f07 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 09:59:20 -0700
Subject: [PATCH 1/3] New package: libnvidia-container-1.10.0

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_rpc_flags.patch               | 12 ++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 4 files changed, 54 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 098f15bbf3e5..7f35c64b3f77 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,5 @@ libCore.so root-6.24.06_1
 libCore.so qtcreator-7.0.2_1
 liblowdown.so lowdown-0.11.2_1
 libjaylink.so.0 libjaylink-0.2.0_1
+libnvidia-container.so.1 libnvidia-container-1.10.0_1
+libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
new file mode 100644
index 000000000000..2ff327e4612c
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..16062c247599
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.10.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=418bdfa14d6339e21a401b945967945ff0b1e99a319783f84ee59a032ff7759d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From b820819ea1d51c7af9e915251315a3f367bf4538 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 09:59:32 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.10.0

---
 srcpkgs/nvidia-container-toolkit/template | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..5c67d55fec39
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,50 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.10.0
+revision=1
+archs="x86_64"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=7c88e6b16df92feac9a14f7ca7f2960409c71760b2563fea29c57c8799930db3
+
+do_build() {
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-toolkit" \
+		"${PWD}/cmd/nvidia-container-toolkit"
+
+	GOPATH="${PWD}/.gopath" \
+	go build -v \
+		-buildmode=pie \
+		-gcflags "all=-trimpath=${PWD}" \
+		-asmflags "all=-trimpath=${PWD}" \
+		-ldflags " -s -w -extldflags=-Wl,-z,now,-z,relro" \
+		-o "nvidia-container-runtime" \
+		"${PWD}/cmd/nvidia-container-runtime"
+
+}
+
+do_install() {
+	vbin nvidia-container-toolkit
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+
+	vbin nvidia-container-runtime
+
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}
+
+do_clean() {
+	GOPATH="${PWD}/.gopath" \
+	go clean -modcache
+}

From beca232908219aeaa0f4fa4a8a440b1dd080b284 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 09:59:35 -0700
Subject: [PATCH 3/3] New package: nvidia-docker-2.11.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..1bb57464f874
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.11.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=01d96e5063da71ad51989b555dfe2fc9af64115ae128e47ceec3a27a3e7dccf2
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (38 preceding siblings ...)
  2022-06-18 17:00 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-06-18 17:46 ` quentin-z80
  2022-06-18 17:51 ` quentin-z80
                   ` (6 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-18 17:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.11.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 6506 bytes --]

From 6b961b0ca0e036e5e09dfe74e8cf06fa056ec61b Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 10:46:18 -0700
Subject: [PATCH 1/3] New package: libnvidia-container-1.10.0

---
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_rpc_flags.patch               | 12 ++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 3 files changed, 52 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
new file mode 100644
index 000000000000..2ff327e4612c
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..16062c247599
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.10.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=418bdfa14d6339e21a401b945967945ff0b1e99a319783f84ee59a032ff7759d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From da43f1fad5dc2252915de898a6e8062065c826f9 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 10:46:25 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.10.0

---
 srcpkgs/nvidia-container-toolkit/template | 25 +++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..7a2f6c125028
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,25 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.10.0
+revision=1
+archs="x86_64"
+build_style=go
+go_import_path=github.com/NVIDIA/nvidia-container-toolkit
+go_package="${go_import_path}/cmd/nvidia-container-toolkit
+ ${go_import_path}/cmd/nvidia-container-runtime
+ ${go_import_path}/cmd/nvidia-ctk"
+hostmakedepends="go"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=7c88e6b16df92feac9a14f7ca7f2960409c71760b2563fea29c57c8799930db3
+
+post_install() {
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}

From 79434c5fbfba1ff8ab8f9f9163d7b46010a55de9 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 10:46:30 -0700
Subject: [PATCH 3/3] New package: nvidia-docker-2.11.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..1bb57464f874
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.11.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=01d96e5063da71ad51989b555dfe2fc9af64115ae128e47ceec3a27a3e7dccf2
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (39 preceding siblings ...)
  2022-06-18 17:46 ` [PR PATCH] [Updated] New package: nvidia-docker-2.11.0 quentin-z80
@ 2022-06-18 17:51 ` quentin-z80
  2022-06-18 17:55 ` [PR REVIEW] " quentin-z80
                   ` (5 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-18 17:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.11.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 6484 bytes --]

From 4766f2af217160668c31cffa898b60ebd181fb8a Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 10:51:38 -0700
Subject: [PATCH 1/3] New package: libnvidia-container-1.10.0

---
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_rpc_flags.patch               | 12 ++++++
 srcpkgs/libnvidia-container/template          | 39 +++++++++++++++++++
 3 files changed, 52 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
new file mode 100644
index 000000000000..2ff327e4612c
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..16062c247599
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,39 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.10.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=418bdfa14d6339e21a401b945967945ff0b1e99a319783f84ee59a032ff7759d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ ${pkgname}.so.1
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ ${pkgname}-go.so.1
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 74c33a6e096ab7ec800ac027741320f8e8956b86 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 10:51:44 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.10.0

---
 srcpkgs/nvidia-container-toolkit/template | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..99d6afdfb11c
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,24 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.10.0
+revision=1
+archs="x86_64"
+build_style=go
+go_import_path=github.com/NVIDIA/nvidia-container-toolkit
+go_package="${go_import_path}/cmd/nvidia-container-toolkit
+ ${go_import_path}/cmd/nvidia-container-runtime
+ ${go_import_path}/cmd/nvidia-ctk"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=7c88e6b16df92feac9a14f7ca7f2960409c71760b2563fea29c57c8799930db3
+
+post_install() {
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}

From f6ed48cf9deebf8091b95c651b024e9fadafa6e9 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 10:51:46 -0700
Subject: [PATCH 3/3] New package: nvidia-docker-2.11.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..1bb57464f874
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.11.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=01d96e5063da71ad51989b555dfe2fc9af64115ae128e47ceec3a27a3e7dccf2
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (40 preceding siblings ...)
  2022-06-18 17:51 ` quentin-z80
@ 2022-06-18 17:55 ` quentin-z80
  2022-06-19  1:06 ` classabbyamp
                   ` (4 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-18 17:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

New review comment by quentin-z80 on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r901001026

Comment:
removed the prefix patch and now only setting it in the template, thanks

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (41 preceding siblings ...)
  2022-06-18 17:55 ` [PR REVIEW] " quentin-z80
@ 2022-06-19  1:06 ` classabbyamp
  2022-06-19  1:06 ` classabbyamp
                   ` (3 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-06-19  1:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r901032398

Comment:
```suggestion
		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
		ln -s /usr/lib/${pkgname}.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}.so
		ln -s /usr/lib/${pkgname}-go.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}-go.so
```

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR REVIEW] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (42 preceding siblings ...)
  2022-06-19  1:06 ` classabbyamp
@ 2022-06-19  1:06 ` classabbyamp
  2022-06-19  3:37 ` [PR PATCH] [Updated] " quentin-z80
                   ` (2 subsequent siblings)
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-06-19  1:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/33059#discussion_r901030684

Comment:
```suggestion
	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/
	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/
	ln -s /usr/lib/${pkgname}.so.${version} ${DESTDIR}/usr/lib/${pkgname}.so.${version%%.*}
	ln -s /usr/lib/${pkgname}-go.so.${version} ${DESTDIR}/usr/lib/${pkgname}-go.so.${version%%.*}
```

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (43 preceding siblings ...)
  2022-06-19  1:06 ` classabbyamp
@ 2022-06-19  3:37 ` quentin-z80
  2022-06-19  4:39 ` quentin-z80
  2022-06-20 17:52 ` [PR PATCH] [Merged]: " classabbyamp
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-19  3:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.11.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7235 bytes --]

From f3b7b084f90b13ffbabfbfdc22b170e5d2de3265 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 20:36:45 -0700
Subject: [PATCH 1/3] New package: libnvidia-container-1.10.0

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_rpc_flags.patch               | 12 ++++++
 srcpkgs/libnvidia-container/template          | 43 +++++++++++++++++++
 4 files changed, 58 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 098f15bbf3e5..7f35c64b3f77 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4162,3 +4162,5 @@ libCore.so root-6.24.06_1
 libCore.so qtcreator-7.0.2_1
 liblowdown.so lowdown-0.11.2_1
 libjaylink.so.0 libjaylink-0.2.0_1
+libnvidia-container.so.1 libnvidia-container-1.10.0_1
+libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
new file mode 100644
index 000000000000..2ff327e4612c
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..29cca16981f6
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,43 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.10.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=418bdfa14d6339e21a401b945967945ff0b1e99a319783f84ee59a032ff7759d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/
+	ln -s /usr/lib/${pkgname}.so.${version} ${DESTDIR}/usr/lib/${pkgname}.so.${version%%.*}
+	ln -s /usr/lib/${pkgname}-go.so.${version} ${DESTDIR}/usr/lib/${pkgname}-go.so.${version%%.*}
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		ln -s /usr/lib/${pkgname}.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}.so
+		ln -s /usr/lib/${pkgname}-go.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}-go.so
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From 599955e61a477f56abd74b37273af338ef6701c5 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 20:36:51 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.10.0

---
 srcpkgs/nvidia-container-toolkit/template | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..99d6afdfb11c
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,24 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.10.0
+revision=1
+archs="x86_64"
+build_style=go
+go_import_path=github.com/NVIDIA/nvidia-container-toolkit
+go_package="${go_import_path}/cmd/nvidia-container-toolkit
+ ${go_import_path}/cmd/nvidia-container-runtime
+ ${go_import_path}/cmd/nvidia-ctk"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=7c88e6b16df92feac9a14f7ca7f2960409c71760b2563fea29c57c8799930db3
+
+post_install() {
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}

From 9f1b2813ebe1612ae749e91095b5472b8516bda2 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 20:36:54 -0700
Subject: [PATCH 3/3] New package: nvidia-docker-2.11.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..1bb57464f874
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.11.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=01d96e5063da71ad51989b555dfe2fc9af64115ae128e47ceec3a27a3e7dccf2
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Updated] New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (44 preceding siblings ...)
  2022-06-19  3:37 ` [PR PATCH] [Updated] " quentin-z80
@ 2022-06-19  4:39 ` quentin-z80
  2022-06-20 17:52 ` [PR PATCH] [Merged]: " classabbyamp
  46 siblings, 0 replies; 48+ messages in thread
From: quentin-z80 @ 2022-06-19  4:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

There is an updated pull request by quentin-z80 against master on the void-packages repository

https://github.com/quentin-z80/void-packages nvidia-docker
https://github.com/void-linux/void-packages/pull/33059

New package: nvidia-docker-2.11.0
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

A patch file from https://github.com/void-linux/void-packages/pull/33059.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-docker-33059.patch --]
[-- Type: text/x-diff, Size: 7235 bytes --]

From 2889a2f9fcae9e8ae559459b2df7543c39c272d3 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 20:36:45 -0700
Subject: [PATCH 1/3] New package: libnvidia-container-1.10.0

---
 common/shlibs                                 |  2 +
 srcpkgs/libnvidia-container-devel             |  1 +
 .../patches/fix_rpc_flags.patch               | 12 ++++++
 srcpkgs/libnvidia-container/template          | 43 +++++++++++++++++++
 4 files changed, 58 insertions(+)
 create mode 120000 srcpkgs/libnvidia-container-devel
 create mode 100644 srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
 create mode 100644 srcpkgs/libnvidia-container/template

diff --git a/common/shlibs b/common/shlibs
index 09430986c2df..449848d9e995 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4165,3 +4165,5 @@ libCore.so root-6.24.06_1
 libCore.so qtcreator-7.0.2_1
 liblowdown.so lowdown-0.11.2_1
 libjaylink.so.0 libjaylink-0.2.0_1
+libnvidia-container.so.1 libnvidia-container-1.10.0_1
+libnvidia-container-go.so.1 libnvidia-container-1.10.0_1
diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel
new file mode 120000
index 000000000000..39e6f1942c7b
--- /dev/null
+++ b/srcpkgs/libnvidia-container-devel
@@ -0,0 +1 @@
+libnvidia-container
\ No newline at end of file
diff --git a/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
new file mode 100644
index 000000000000..2ff327e4612c
--- /dev/null
+++ b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch
@@ -0,0 +1,12 @@
+--- a/Makefile    2021-11-23 10:58:59.234599602 -0800
++++ b/Makefile   2021-11-23 11:00:02.476171671 -0800
+@@ -126,7 +126,8 @@
+             -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \
+             -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \
+             -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \
+-            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS)
++            -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \
++            -I/usr/include/tirpc -ltirpc $(CFLAGS)
+ LDFLAGS  := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS)
+ LDLIBS   := $(LDLIBS)
+ 
diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template
new file mode 100644
index 000000000000..29cca16981f6
--- /dev/null
+++ b/srcpkgs/libnvidia-container/template
@@ -0,0 +1,43 @@
+# Template file for 'libnvidia-container'
+pkgname=libnvidia-container
+version=1.10.0
+revision=1
+archs="x86_64"
+hostmakedepends="tar xz curl bmake groff m4 pkg-config which go"
+makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel"
+short_desc="NVIDIA container runtime library"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/libnvidia-container"
+distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz"
+checksum=418bdfa14d6339e21a401b945967945ff0b1e99a319783f84ee59a032ff7759d
+
+do_build() {
+	make dist prefix=/usr REVISION=${version}
+}
+
+pre_install() {
+	cd dist
+	tar xvf ${pkgname}_${version}_${archs}.tar.xz
+}
+
+do_install() {
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/
+	vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/
+	ln -s /usr/lib/${pkgname}.so.${version} ${DESTDIR}/usr/lib/${pkgname}.so.${version%%.*}
+	ln -s /usr/lib/${pkgname}-go.so.${version} ${DESTDIR}/usr/lib/${pkgname}-go.so.${version%%.*}
+
+	vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli
+}
+
+libnvidia-container-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/
+		ln -s /usr/lib/${pkgname}.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}.so
+		ln -s /usr/lib/${pkgname}-go.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}-go.so
+		vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/
+		vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/
+	}
+}

From c44f316b398b12c5820c853210a029a5a923fde5 Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 20:36:51 -0700
Subject: [PATCH 2/3] New package: nvidia-container-toolkit-1.10.0

---
 srcpkgs/nvidia-container-toolkit/template | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/nvidia-container-toolkit/template

diff --git a/srcpkgs/nvidia-container-toolkit/template b/srcpkgs/nvidia-container-toolkit/template
new file mode 100644
index 000000000000..99d6afdfb11c
--- /dev/null
+++ b/srcpkgs/nvidia-container-toolkit/template
@@ -0,0 +1,24 @@
+# Template file for 'nvidia-container-toolkit'
+pkgname=nvidia-container-toolkit
+version=1.10.0
+revision=1
+archs="x86_64"
+build_style=go
+go_import_path=github.com/NVIDIA/nvidia-container-toolkit
+go_package="${go_import_path}/cmd/nvidia-container-toolkit
+ ${go_import_path}/cmd/nvidia-container-runtime
+ ${go_import_path}/cmd/nvidia-ctk"
+depends="libnvidia-container"
+short_desc="Build and run containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
+distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
+checksum=7c88e6b16df92feac9a14f7ca7f2960409c71760b2563fea29c57c8799930db3
+
+post_install() {
+	ln -sf /usr/bin/nvidia-container-toolkit ${DESTDIR}/usr/bin/nvidia-container-runtime-hook
+	vmkdir /etc/nvidia-container-runtime 755
+	vinstall config/config.toml.centos 644 /etc/nvidia-container-runtime config.toml
+	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
+}

From 87336a99a137a40048c7cbe1b96f50fe8b94a1ef Mon Sep 17 00:00:00 2001
From: Quentin Freimanis <quentinfreimanis@gmail.com>
Date: Sat, 18 Jun 2022 20:36:54 -0700
Subject: [PATCH 3/3] New package: nvidia-docker-2.11.0

---
 srcpkgs/nvidia-docker/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/nvidia-docker/template

diff --git a/srcpkgs/nvidia-docker/template b/srcpkgs/nvidia-docker/template
new file mode 100644
index 000000000000..1bb57464f874
--- /dev/null
+++ b/srcpkgs/nvidia-docker/template
@@ -0,0 +1,17 @@
+# Template file for 'nvidia-docker'
+pkgname=nvidia-docker
+version=2.11.0
+revision=1
+archs="x86_64"
+depends="nvidia-container-toolkit libnvidia-container docker"
+short_desc="Build and run Docker containers leveraging NVIDIA GPUs"
+maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/NVIDIA/nvidia-docker"
+distfiles="https://github.com/NVIDIA/nvidia-docker/archive/v${version}.tar.gz"
+checksum=01d96e5063da71ad51989b555dfe2fc9af64115ae128e47ceec3a27a3e7dccf2
+
+do_install() {
+	vbin nvidia-docker
+	vinstall daemon.json 644 etc/docker/
+}

^ permalink raw reply	[flat|nested] 48+ messages in thread

* Re: [PR PATCH] [Merged]: New package: nvidia-docker-2.11.0
  2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
                   ` (45 preceding siblings ...)
  2022-06-19  4:39 ` quentin-z80
@ 2022-06-20 17:52 ` classabbyamp
  46 siblings, 0 replies; 48+ messages in thread
From: classabbyamp @ 2022-06-20 17:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

There's a merged pull request on the void-packages repository

New package: nvidia-docker-2.11.0
https://github.com/void-linux/void-packages/pull/33059

Description:
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me

Resolves:  #11084
Supersedes #17505

Can be tested by running:
`docker run --gpus all nvidia/cuda:9.0-base nvidia-smi`

^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2022-06-20 17:52 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 20:56 [PR PATCH] New package: nvidia-docker-2.6.0 quentin-z80
2021-10-15 16:39 ` [PR PATCH] [Updated] " quentin-z80
2021-11-11 23:16 ` quentin-z80
2021-11-24  0:26 ` quentin-z80
2021-11-25  0:00 ` [PR PATCH] [Updated] New package: nvidia-docker-2.7.0 quentin-z80
2021-11-25  0:03 ` quentin-z80
2021-12-20 22:23 ` quentin-z80
2021-12-22  4:58 ` quentin-z80
2021-12-22 22:25 ` quentin-z80
2022-01-03  9:04 ` New package: nvidia-docker-2.8.0 classabbyamp
2022-01-03 20:19 ` classabbyamp
2022-01-04  0:31 ` classabbyamp
2022-01-04  0:33 ` classabbyamp
2022-01-04  1:11 ` [PR PATCH] [Updated] " quentin-z80
2022-01-21 22:55 ` quentin-z80
2022-01-30  0:59 ` jchook
2022-01-30  3:45 ` [PR PATCH] [Updated] " quentin-z80
2022-01-30  3:53 ` quentin-z80
2022-01-30  4:00 ` quentin-z80
2022-01-31  5:43 ` jchook
2022-01-31  5:44 ` jchook
2022-01-31  5:51 ` jchook
2022-01-31 18:09 ` [PR PATCH] [Updated] " quentin-z80
2022-02-02  4:16 ` quentin-z80
2022-02-02 17:32 ` [PR REVIEW] " classabbyamp
2022-02-02 18:51 ` [PR PATCH] [Updated] " quentin-z80
2022-02-02 18:51 ` [PR REVIEW] " quentin-z80
2022-02-20 19:25 ` [PR PATCH] [Updated] " quentin-z80
2022-02-26  5:48 ` ryjelsum
2022-02-26  6:52 ` jchook
2022-03-02 19:48 ` [PR PATCH] [Updated] " quentin-z80
2022-04-08  0:03 ` [PR PATCH] [Updated] New package: nvidia-docker-2.9.1 quentin-z80
2022-05-01 19:55 ` New package: nvidia-docker-2.10.0 nuxion
2022-05-07 22:20 ` [PR PATCH] [Updated] " quentin-z80
2022-05-07 22:21 ` quentin-z80
2022-06-12  1:24 ` quentin-z80
2022-06-14 18:36 ` [PR REVIEW] " classabbyamp
2022-06-14 18:36 ` classabbyamp
2022-06-14 18:36 ` classabbyamp
2022-06-18 17:00 ` [PR PATCH] [Updated] " quentin-z80
2022-06-18 17:46 ` [PR PATCH] [Updated] New package: nvidia-docker-2.11.0 quentin-z80
2022-06-18 17:51 ` quentin-z80
2022-06-18 17:55 ` [PR REVIEW] " quentin-z80
2022-06-19  1:06 ` classabbyamp
2022-06-19  1:06 ` classabbyamp
2022-06-19  3:37 ` [PR PATCH] [Updated] " quentin-z80
2022-06-19  4:39 ` quentin-z80
2022-06-20 17:52 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).