summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDaniel Bermond2020-07-25 16:07:06 +0000
committerDaniel Bermond2020-07-25 16:08:00 +0000
commit504c3616ef2b9819a15ac2775300c696a86fe064 (patch)
tree886ef532029788593c26073aa1d307bd7a722b39 /PKGBUILD
parentdee6d8c58f9526488e0a68f8f42aa759f92070a5 (diff)
downloadaur-504c3616ef2b9819a15ac2775300c696a86fe064.tar.gz
Adjust Makefile for cuda 11.0. Disable cudnn. Cosmetic changes.
cuda 11.0 minimum supported architecture is 5.2 (compute_52/sm_52). caffe currently fails to build with cudnn 8.0.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 13 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 45fe7f8dffc..5a0934609cc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@
pkgname=caffe-cuda
pkgver=1.0
-pkgrel=9
+pkgrel=10
pkgdesc='A deep learning framework made with expression, speed, and modularity in mind (with cuda support)'
arch=('x86_64')
url='https://caffe.berkeleyvision.org/'
license=('BSD')
depends=('openblas' 'lapack' 'boost-libs' 'protobuf' 'google-glog' 'gflags'
'hdf5' 'opencv' 'leveldb' 'lmdb' 'python' 'python-numpy' 'python-pandas'
- 'cuda' 'cudnn' 'nccl')
+ 'cuda' 'nccl')
optdepends=(
# official repositories:
'cython' 'python-scipy' 'python-matplotlib' 'ipython' 'python-h5py'
@@ -26,17 +26,14 @@ provides=('caffe')
conflicts=('caffe')
source=("caffe-${pkgver}.tar.gz"::"https://github.com/BVLC/caffe/archive/${pkgver}.tar.gz"
'Makefile.config'
- 'caffe-1.0-opencv4-fix.patch')
+ 'caffe-opencv4-fix.patch'::'https://github.com/BVLC/caffe/pull/6625/commits/7f503bd9a19758a173064e299ab9d4cac65ed60f.patch')
sha256sums=('71d3c9eb8a183150f965a465824d01fe82826c22505f7aa314f700ace03fa77f'
- 'eefbefb25d99e801066526eabd57ed11efd05d0f6e312e40cd030d3a13f06ed4'
+ 'fa15c69970a6006512319944dc171e92b42b3eb0ea8d0e9e1fb9cf0e4833b04c'
'2072c8ca1393b53ef280a15c43af940cc9bf1419ae32b3d8a6541b10b8cb50e9')
prepare() {
cp -af Makefile.config "caffe-${pkgver}"
-
- # fix build with opencv 4
- # https://github.com/BVLC/caffe/pull/6625
- patch -d "caffe-${pkgver}" -Np1 -i "${srcdir}/caffe-1.0-opencv4-fix.patch"
+ patch -d "caffe-${pkgver}" -Np1 -i "${srcdir}/caffe-opencv4-fix.patch"
}
build() {
@@ -50,35 +47,31 @@ check() {
}
package() {
- cd "caffe-${pkgver}/distribute"
-
local _pyver
_pyver="$(python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')"
mkdir -p "$pkgdir"/usr/{bin,include,lib/python"$_pyver"/site-packages,share/doc}
# binaries
- install -m755 bin/* "${pkgdir}/usr/bin"
+ install -m755 "caffe-${pkgver}/distribute/bin"/* "${pkgdir}/usr/bin"
# library
- cp -a lib/libcaffe.so* "${pkgdir}/usr/lib"
+ cp -a "caffe-${pkgver}/distribute/lib"/libcaffe.so* "${pkgdir}/usr/lib"
chmod 755 "${pkgdir}/usr/lib"/libcaffe.so.*.*.*
# headers
- cp -a include "${pkgdir}/usr"
+ cp -a "caffe-${pkgver}/distribute/include" "${pkgdir}/usr"
# python
- install -m755 python/*.py "${pkgdir}/usr/bin"
- cp -a python/caffe "${pkgdir}/usr/lib/python${_pyver}/site-packages"
+ install -m755 "caffe-${pkgver}/distribute/python"/*.py "${pkgdir}/usr/bin"
+ cp -a "caffe-${pkgver}/distribute/python/caffe" "${pkgdir}/usr/lib/python${_pyver}/site-packages"
# proto
- install -D -m644 proto/caffe.proto -t "${pkgdir}/usr/share/caffe"
-
- cd "${srcdir}/caffe-${pkgver}"
+ install -D -m644 "caffe-${pkgver}/distribute/proto/caffe.proto" -t "${pkgdir}/usr/share/caffe"
# docs
- cp -a doxygen/html "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -a "caffe-${pkgver}/doxygen/html" "${pkgdir}/usr/share/doc/${pkgname}"
# license
- install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -D -m644 "caffe-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}