Github messages for voidlinux
 help / color / mirror / Atom feed
From: quentin-z80 <quentin-z80@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: nvidia-docker-2.8.0
Date: Mon, 31 Jan 2022 19:09:43 +0100	[thread overview]
Message-ID: <20220131180943.2HZrQq2D_OT2plsre6HM3rKQ3lkYrobqWirhVW6JXcM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-33059@inbox.vuxu.org>

[-- 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/
+}

  parent reply	other threads:[~2022-01-31 18:09 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` quentin-z80 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220131180943.2HZrQq2D_OT2plsre6HM3rKQ3lkYrobqWirhVW6JXcM@z \
    --to=quentin-z80@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).