diff options
author | Jingbei Li | 2017-10-03 18:11:53 +0800 |
---|---|---|
committer | Jingbei Li | 2017-10-03 18:11:53 +0800 |
commit | 19235862c01def5b6fa3e437968b080a28f43531 (patch) | |
tree | 091487f256762a5612cca7da59904c7a1c9d3c0f | |
parent | d8234fa5897c36e4025e97ed760090c930990071 (diff) | |
download | aur-19235862c01def5b6fa3e437968b080a28f43531.tar.gz |
added cuda support
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 35 |
2 files changed, 44 insertions, 17 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Mon Oct 2 19:16:08 UTC 2017 +# Tue Oct 3 10:11:48 UTC 2017 pkgbase = cntk pkgdesc = Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit pkgver = 2.2 @@ -7,9 +7,29 @@ pkgbase = cntk url = https://github.com/Microsoft/CNTK arch = x86_64 license = CUSTOM - makedepends = python - makedepends = openblas + makedepends = cmake + makedepends = git + makedepends = inetutils + makedepends = java-environment + makedepends = python-pip + makedepends = python-setuptools + makedepends = python-wheel makedepends = swig + depends = boost + depends = cub + depends = cuda + depends = cudnn6 + depends = libzip + depends = nccl + depends = nvidia-utils + depends = openblas + depends = opencv + depends = openmpi + depends = protobuf + depends = python-numpy + depends = python-scipy + optdepends = swig + optdepends = java-environment source = git+https://github.com/Microsoft/CNTK#tag=v2.2 md5sums = SKIP @@ -7,9 +7,9 @@ pkgdesc="Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolki arch=('x86_64') url="https://github.com/Microsoft/$_gitname" license=('CUSTOM') -depends=() -optdepends=() -makedepends=('python' 'openblas' 'swig') +depends=('boost' 'cub' 'cuda' 'cudnn6' 'libzip' 'nccl' 'nvidia-utils' 'openblas' 'opencv' 'openmpi' 'protobuf' 'python-numpy' 'python-scipy') +makedepends=('cmake' 'git' 'inetutils' 'java-environment' 'python-pip' 'python-setuptools' 'python-wheel' 'swig' ) +optdepends=('swig' 'java-environment' ) source=("git+$url#tag=v$pkgver") md5sums=('SKIP') @@ -19,33 +19,40 @@ prepare(){ sed '24a#include <cmath>' -i Source/CNTKv2LibraryDll/API/CNTKLibrary.h sed \ -e 's|libprotobuf.a|libprotobuf.so|' \ + -e 's|cuda/include/cudnn.h|include/cudnn.h|' \ -i configure - # -e 's|cuda/include/cudnn.h|include/cudnn.h|' \ - mkdir build + mkdir -p build ./configure \ --with-build-top=build \ - --python=yes \ --with-jdk=/usr/lib/jvm/default \ --with-openblas \ - --with-opencv - # --with-cuda=/opt/cuda \ - # --with-cub=/usr/include \ - # --with-gdk-include=/opt/cuda/include \ - # --with-gdk-nvml-lib=/opt/cuda/lib64/stubs/ \ - # --with-cudnn=/opt/cudnn6 \ - # --with-nccl=/opt/cuda \ + --with-opencv \ + --with-py36-path \ + --with-cuda=/opt/cuda \ + --with-cub=/usr/include \ + --with-gdk-include=/opt/cuda/include \ + --with-gdk-nvml-lib=/opt/cuda/lib64/stubs \ + --with-cudnn=/opt/cudnn6 \ + --with-nccl=/opt/cuda \ + --with-swig + #--with-kaldi=/opt/kaldi \ sed \ -e 's| $(PROTOBUF_PATH)/lib/libprotobuf.a| -lprotobuf|' \ + -e 's|$(CUDNN_PATH)/cuda|$(CUDNN_PATH)|g'\ -i Makefile } build() { cd $srcdir/$_gitname/build - make CXXFLAGS='-Wno-sign-compare -fPIC' + make \ + CXXFLAGS='-Wno-sign-compare -fPIC' } package() { mkdir -p $pkgdir/usr cd $srcdir/$_gitname/build cp -r bin lib $pkgdir/usr + + cd $srcdir/$_gitname/build/python + pip install --root=$pkgdir $pkgname-$pkgver-cp36-cp36m-linux_x86_64.whl } |