summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Shapiro2021-05-19 12:28:01 -0500
committerJoel Shapiro2021-05-19 12:29:24 -0500
commit269f783e9db636f6d19eca4f46b07308ba39c5df (patch)
tree53dc09f30fb2fb1eac9ccf0dbc047bc849dacb29
parent2da91ac3cc13838567541daebef5dcbcdec16c88 (diff)
downloadaur-269f783e9db636f6d19eca4f46b07308ba39c5df.tar.gz
Major changes, bump to v1.5.0
This change also helps users use the new cgroups config and explain the docker changes needed.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD13
-rw-r--r--fix_cgroup.patch13
-rw-r--r--nvidia-container-toolkit.install32
4 files changed, 61 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1975435a7028..0d0a0e558d0a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = nvidia-container-toolkit
pkgdesc = NVIDIA container runtime toolkit
- pkgver = 1.4.2
+ pkgver = 1.5.0
pkgrel = 1
url = https://github.com/NVIDIA/nvidia-container-toolkit
+ install = nvidia-container-toolkit.install
arch = x86_64
license = Apache
makedepends = go
@@ -10,7 +11,9 @@ pkgbase = nvidia-container-toolkit
conflicts = nvidia-container-runtime-hook
conflicts = nvidia-container-runtime<2.0.0
replaces = nvidia-container-runtime-hook
- source = v1.4.2-1.tar.gz::https://github.com/NVIDIA/nvidia-container-toolkit/archive/v1.4.2.tar.gz
- sha256sums = 8c3ff8dd96812dcc2c09b203d2749fcba51941e33387aba1bca4da2f87065a0c
+ source = fix_cgroup.patch
+ source = v1.5.0-1.tar.gz::https://github.com/NVIDIA/nvidia-container-toolkit/archive/v1.5.0.tar.gz
+ sha256sums = 48a36a4b01ab64739d55c4a696bbe72f2b90a9e5abc0b9d1c4090a3016d9a1fb
+ sha256sums = a233de640a69fa3ff1c0e5b929b6c37922b040471a02eb98b6cf209a0dcac107
pkgname = nvidia-container-toolkit
diff --git a/PKGBUILD b/PKGBUILD
index 866c311e912e..37854cb90830 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=nvidia-container-toolkit
-pkgver=1.4.2
+pkgver=1.5.0
pkgrel=1
pkgdesc='NVIDIA container runtime toolkit'
@@ -16,14 +16,21 @@ depends=('libnvidia-container-tools>=1.3.3')
conflicts=('nvidia-container-runtime-hook' 'nvidia-container-runtime<2.0.0')
replaces=('nvidia-container-runtime-hook')
-source=("v${pkgver}-${pkgrel}.tar.gz"::"${url}/archive/v${pkgver}.tar.gz")
-sha256sums=('8c3ff8dd96812dcc2c09b203d2749fcba51941e33387aba1bca4da2f87065a0c')
+source=(fix_cgroup.patch
+ "v${pkgver}-${pkgrel}.tar.gz"::"${url}/archive/v${pkgver}.tar.gz")
+sha256sums=('48a36a4b01ab64739d55c4a696bbe72f2b90a9e5abc0b9d1c4090a3016d9a1fb'
+ 'a233de640a69fa3ff1c0e5b929b6c37922b040471a02eb98b6cf209a0dcac107')
+
+install=$pkgname.install
_srcdir="nvidia-container-toolkit-${pkgver}"
_golang_pkg_path="github.com/NVIDIA/nvidia-container-toolkit/pkg"
build() {
cd "${_srcdir}"
+
+ patch -Np1 -i "${srcdir}/fix_cgroup.patch"
+
GOPATH="${srcdir}/gopath" \
go build -v \
-buildmode=pie \
diff --git a/fix_cgroup.patch b/fix_cgroup.patch
new file mode 100644
index 000000000000..37b97a97a703
--- /dev/null
+++ b/fix_cgroup.patch
@@ -0,0 +1,13 @@
+diff --git a/config/config.toml.centos b/config/config.toml.centos
+index 24e8e7f..6439638 100644
+--- a/config/config.toml.centos
++++ b/config/config.toml.centos
+@@ -10,7 +10,7 @@ environment = []
+ #debug = "/var/log/nvidia-container-toolkit.log"
+ #ldcache = "/etc/ld.so.cache"
+ load-kmods = true
+-#no-cgroups = false
++no-cgroups = true
+ #user = "root:video"
+ ldconfig = "@/sbin/ldconfig"
+
diff --git a/nvidia-container-toolkit.install b/nvidia-container-toolkit.install
new file mode 100644
index 000000000000..2d89b0571f92
--- /dev/null
+++ b/nvidia-container-toolkit.install
@@ -0,0 +1,32 @@
+post_install() {
+cat <<"EOF"
+Warning about nvidia containers!
+
+Systemd v247.2-2 introduced a unified cgroup change which has somewhat
+broken nvidia-container's access to the handles in
+/sys/fs/cgroup/devices.
+
+If you are using Docker you will then need to explicitly allow access
+to the nvidia devices like:
+
+docker run ... --gpus all --device /dev/nvidia0 --device \
+ /dev/nvidia-uvm --device /dev/nvidia-uvm-tools --device \
+ /dev/nvidiactl ...
+
+or by using a docker-compose which esposes the devices with:
+
+devices:
+ - /dev/nvidia0:/dev/nvidia0
+ - /dev/nvidiactl:/dev/nvidiactl
+ - /dev/nvidia-modeset:/dev/nvidia-modeset
+ - /dev/nvidia-uvm:/dev/nvidia-uvm
+ - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
+
+See the link for more details:
+https://github.com/NVIDIA/nvidia-docker/issues/1447#issuecomment-757034464
+EOF
+}
+
+post_upgrade() {
+ post_install
+}