diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | README.md | 20 | ||||
-rwxr-xr-x | buildandcopy.sh | 27 | ||||
-rw-r--r-- | nvidia-docker.install | 5 |
5 files changed, 25 insertions, 85 deletions
@@ -1,17 +1,15 @@ pkgbase = nvidia-docker pkgdesc = Build and run Docker containers leveraging NVIDIA GPUs - pkgver = 1.0.1 - pkgrel = 1 + pkgver = 2.0.3 + pkgrel = 2 url = https://github.com/NVIDIA/nvidia-docker - install = nvidia-docker.install arch = x86_64 license = custom - makedepends = libarchive - optdepends = cuda - optdepends = nvidia - optdepends = opencl-nvidia - source_x86_64 = https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker-1.0.1-1.x86_64.rpm - sha256sums_x86_64 = f05dfe7fe655ed39c399db0d6362e351b059f2708c3e6da17f590a000237ec3a + depends = docker + depends = nvidia-container-runtime + depends = nvidia-container-runtime-hook + source = https://github.com/NVIDIA/nvidia-docker/blob/gh-pages/centos7/x86_64/nvidia-docker2-2.0.3-1.docker18.03.1.ce.noarch.rpm?raw=true + sha256sums = e07186b8e503ab4a170631714226cb6fc9992534f3ddcb226f7d9a186e832633 pkgname = nvidia-docker @@ -1,32 +1,22 @@ -# Maintainer: Marcel Huber <marcelhuberfoo@gmail.com> +# Maintainer: Ivan Semkin (ivan at semkin dot ru) pkgname=nvidia-docker -pkgver=1.0.1 -pkgrel=1 -pkgdesc="Build and run Docker containers leveraging NVIDIA GPUs" -license=('custom') -arch=('x86_64') +pkgver=2.0.3 +pkgrel=2 +pkgdesc='Build and run Docker containers leveraging NVIDIA GPUs' +arch=(x86_64) url='https://github.com/NVIDIA/nvidia-docker' -makedepends=(libarchive) -optdepends=(cuda nvidia opencl-nvidia) -install=${pkgname}.install -source_x86_64=(https://github.com/NVIDIA/nvidia-docker/releases/download/v${pkgver}/nvidia-docker-${pkgver}-1.${arch}.rpm) -sha256sums_x86_64=('f05dfe7fe655ed39c399db0d6362e351b059f2708c3e6da17f590a000237ec3a') +license=(custom) +depends=(docker nvidia-container-runtime nvidia-container-runtime-hook) -build() { - cd $srcdir - sed -r -i -e '/^User=/ d' \ - -e 's|^(.*SOCK_DIR=).*$|\1/run/docker/plugins"|' \ - -e 's|(SPEC_FILE=)/etc|\1/run|' \ - usr/lib/systemd/system/$pkgname.service -} +source=("https://github.com/NVIDIA/nvidia-docker/blob/gh-pages/centos7/x86_64/nvidia-docker2-$pkgver-1.docker18.03.1.ce.noarch.rpm?raw=true") +sha256sums=('e07186b8e503ab4a170631714226cb6fc9992534f3ddcb226f7d9a186e832633') -package() { - cd $srcdir - install -m755 -d $pkgdir/usr/{bin,share/licenses/$pkgname,lib/systemd/system} - install -D -m755 usr/bin/$pkgname* "$pkgdir/usr/bin/" - install -D -m644 usr/lib/systemd/system/$pkgname.service "$pkgdir/usr/lib/systemd/system/" - install -D -m644 usr/share/licenses/$pkgname-*/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +package() { + install -d "${pkgdir}/usr/bin" + install -d "${pkgdir}/etc/docker" + + install -m755 "${srcdir}/usr/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -m644 "${srcdir}/etc/docker/daemon.json" "${pkgdir}/etc/docker/daemon.json" } - -# vim: set ft=sh syn=sh ts=2 sw=2 et: +# vim:set ts=2 sw=2 et: diff --git a/README.md b/README.md deleted file mode 100644 index 3675d377c689..000000000000 --- a/README.md +++ /dev/null @@ -1,20 +0,0 @@ -arch-nvidia-docker -============ - - ArchLinux PKGBUILD for nvidia-docker tools https://github.com/NVIDIA/nvidia-docker - - The package source build is submitted to AUR at: https://aur.archlinux.org/packages/nvidia-docker/ - -Building and submitting the package ----------------------- - -* Update PKGBUILD and set `pkgver` to match new version from https://github.com/NVIDIA/nvidia-docker/releases -* Update the checksums using `updpkgsums` -* Make the package using `makepkg --force --nodeps --cleanbuild` -* Check the submitting guidelines at https://wiki.archlinux.org/index.php/Arch%20User%20Repository#Submitting%20packages -* `makepkg --printsrcinfo > .SRCINFO` -* `git add .SRCINFO` -* `git commit -m "useful commit message"` -* `git push origin` - -To automate most of the steps, you could also use the `buildandcopy.sh` script provided. diff --git a/buildandcopy.sh b/buildandcopy.sh deleted file mode 100755 index f7619edea667..000000000000 --- a/buildandcopy.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -thedirs="." -repodir=/home/own-repo - -thingsToDo=( - 'for n in $thedirs; do ( cd $n && updpkgsums); done' - 'for n in $thedirs; do ( cd $n && makepkg --force --nodeps --nobuild; makepkg --printsrcinfo > .SRCINFO ); done' - 'git diff --quiet --no-ext-diff --exit-code && echo clean || ( git diff -b -w && git add -p && git commit ) || true' - 'for n in $thedirs; do ( cd $n && makepkg --force --nodeps --noextract --cleanbuild --skipchecksums); done' - 'test -n "$repodir" -a -d "$repodir" && for n in $thedirs; do for pkgdir in $(find $n -name "*.tar.xz" -printf "%h\n" | sort | uniq); do cpfn=$(ls -tc1 $pkgdir/*.tar.xz | head -1); echo "move [$cpfn]? (y*|n)"; read v; if [ ! "$v" = "n" -a ! "$v" = "N" ]; then sh -c "mv --interactive --update $cpfn $repodir && ( repo-add --new --quiet ${repodir}/ownrepo.db.tar.gz $repodir/$(basename $cpfn); )"; fi; done; done' - 'git push origin' - 'for n in $thedirs; do ( cd $n && makepkg --nodeps --noextract --force --nobuild --noarchive --nocheck --noprepare --skipinteg --clean ); done' -) - -set -e - -for n in "${thingsToDo[@]}"; do - echo "Continue with [$n] (y*|n)?" - read v - if [ "$v" = "n" -o "$v" = "N" ]; then - echo "..command skipped.."; - else - eval "$n"; - fi -done - diff --git a/nvidia-docker.install b/nvidia-docker.install index 7b0fccfe9cb3..f8cf63443c8f 100644 --- a/nvidia-docker.install +++ b/nvidia-docker.install @@ -1,11 +1,10 @@ post_install() { cat << EOF => Prior to running 'CUDA'-containers, ensure that the nvidia-docker-plugin - is loaded. -> https://github.com/NVIDIA/nvidia-docker#other-distributions + is loaded. -> https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0) -*) manually; sudo -b nohup nvidia-docker-plugin > /tmp/nvidia-docker.log +sudo pkill -SIGHUP dockerd -*) automatically at startup; systemctl enable nvidia-docker.service EOF } |