summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2017-04-29 13:20:11 -0300
committerDaniel Bermond2017-04-29 13:20:11 -0300
commit9a3c97b71c30e47653153c830500b946a66271eb (patch)
tree94ab7b998da37d97a6a2b78f4c2db1a0d3fff555
downloadaur-9a3c97b71c30e47653153c830500b946a66271eb.tar.gz
Initial commit
-rw-r--r--.SRCINFO91
-rw-r--r--PKGBUILD201
2 files changed, 292 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3c1e83f0d0b2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,91 @@
+# Generated by mksrcinfo v8
+# Sat Apr 29 16:20:06 UTC 2017
+pkgbase = caffe2-git
+ pkgdesc = A new lightweight, modular, and scalable deep learning framework (git version, gpu enabled)
+ pkgver = 0.7.0.r121.gf46860e3
+ pkgrel = 1
+ url = http://caffe2.ai/
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = cmake
+ depends = google-glog
+ depends = protobuf
+ depends = python2
+ depends = python2-numpy
+ depends = python2-protobuf
+ depends = gflags
+ depends = gtest
+ depends = openmp
+ depends = leveldb
+ depends = lmdb
+ depends = opencv
+ depends = openmpi
+ depends = snappy
+ depends = zeromq
+ depends = hiredis
+ depends = python2-pydot
+ depends = python2-flask
+ depends = graphviz
+ depends = python2-hypothesis
+ depends = python2-jupyter_core
+ depends = python2-matplotlib
+ depends = python2-yaml
+ depends = python2-requests
+ depends = python2-scipy
+ depends = python2-setuptools
+ depends = python2-tornado
+ depends = python2-pyzmq
+ depends = cudnn
+ depends = nccl
+ depends = python2-scikit-image
+ depends = python2-leveldb
+ depends = python2-lmdb
+ provides = caffe2
+ conflicts = caffe
+ conflicts = caffe-cpu
+ conflicts = caffe-git
+ conflicts = caffe-cpu-git
+ conflicts = caffe2
+ conflicts = caffe2-cpu
+ conflicts = caffe2-cpu-git
+ options = !emptydirs
+ source = caffe2-git::git+https://github.com/caffe2/caffe2.git
+ source = submodule-pybind11::git+https://github.com/pybind/pybind11.git
+ source = submodule-nccl::git+https://github.com/nvidia/nccl.git
+ source = submodule-cnmem::git+https://github.com/nvidia/cnmem.git
+ source = submodule-cub::git+https://github.com/NVlabs/cub.git
+ source = submodule-eigen::git+https://github.com/RLovelett/eigen.git
+ source = submodule-googletest::git+https://github.com/google/googletest.git
+ source = submodule-nervanagpu::git+https://github.com/NervanaSystems/nervanagpu.git
+ source = submodule-benchmark::git+https://github.com/google/benchmark.git
+ source = submodule-protobuf::git+https://github.com/google/protobuf.git
+ source = submodule-android-cmake::git+https://github.com/taka-no-me/android-cmake.git
+ source = submodule-ios-cmake::git+https://github.com/Yangqing/ios-cmake.git
+ source = submodule-NNPACK::git+https://github.com/Maratyszcza/NNPACK.git
+ source = submodule-gloo::git+https://github.com/facebookincubator/gloo
+ source = submodule-NNPACK_deps-pthreadpool::git+https://github.com/Maratyszcza/pthreadpool.git
+ source = submodule-NNPACK_deps-FXdiv::git+https://github.com/Maratyszcza/FXdiv.git
+ source = submodule-NNPACK_deps-FP16::git+https://github.com/Maratyszcza/FP16.git
+ source = submodule-NNPACK_deps-psimd::git+https://github.com/Maratyszcza/psimd.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = caffe2-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f389f5a3637a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,201 @@
+# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
+
+pkgname=caffe2-git
+pkgver=0.7.0.r121.gf46860e3
+pkgrel=1
+pkgdesc="A new lightweight, modular, and scalable deep learning framework (git version, gpu enabled)"
+arch=('x86_64')
+url="http://caffe2.ai/"
+license=('BSD')
+depends=(
+ # binary repositories:
+ # required:
+ 'google-glog' 'protobuf' 'python2' 'python2-numpy' 'python2-protobuf'
+ # not required but enabled in build:
+ 'gflags' 'gtest' 'openmp' 'leveldb' 'lmdb' 'opencv' 'openmpi' 'snappy'
+ 'zeromq' 'hiredis'
+ # python2:
+ 'python2-pydot' 'python2-flask' 'graphviz' 'python2-hypothesis'
+ 'python2-jupyter_core' 'python2-matplotlib' 'python2-yaml' 'python2-requests'
+ 'python2-scipy' 'python2-setuptools' 'python2-tornado' 'python2-pyzmq'
+ # AUR:
+ # required:
+ 'cudnn'
+ # not required but enabled in build:
+ 'nccl'
+ # python2:
+ 'python2-scikit-image' 'python2-leveldb' 'python2-lmdb'
+ # missing:
+ # 'python2-nvd3'
+)
+makedepends=('git' 'cmake')
+provides=('caffe2')
+conflicts=('caffe' 'caffe-cpu' 'caffe-git' 'caffe-cpu-git'
+ 'caffe2' 'caffe2-cpu' 'caffe2-cpu-git')
+options=('!emptydirs')
+source=(
+ # main source:
+ "$pkgname"::"git+https://github.com/caffe2/caffe2.git"
+ # git submodules:
+ 'submodule-pybind11'::'git+https://github.com/pybind/pybind11.git'
+ 'submodule-nccl'::'git+https://github.com/nvidia/nccl.git'
+ 'submodule-cnmem'::'git+https://github.com/nvidia/cnmem.git'
+ 'submodule-cub'::'git+https://github.com/NVlabs/cub.git'
+ 'submodule-eigen'::'git+https://github.com/RLovelett/eigen.git'
+ 'submodule-googletest'::'git+https://github.com/google/googletest.git'
+ 'submodule-nervanagpu'::'git+https://github.com/NervanaSystems/nervanagpu.git'
+ 'submodule-benchmark'::'git+https://github.com/google/benchmark.git'
+ 'submodule-protobuf'::'git+https://github.com/google/protobuf.git'
+ 'submodule-android-cmake'::'git+https://github.com/taka-no-me/android-cmake.git'
+ 'submodule-ios-cmake'::'git+https://github.com/Yangqing/ios-cmake.git'
+ 'submodule-NNPACK'::'git+https://github.com/Maratyszcza/NNPACK.git'
+ 'submodule-gloo'::'git+https://github.com/facebookincubator/gloo'
+ 'submodule-NNPACK_deps-pthreadpool'::'git+https://github.com/Maratyszcza/pthreadpool.git'
+ 'submodule-NNPACK_deps-FXdiv'::'git+https://github.com/Maratyszcza/FXdiv.git'
+ 'submodule-NNPACK_deps-FP16'::'git+https://github.com/Maratyszcza/FP16.git'
+ 'submodule-NNPACK_deps-psimd'::'git+https://github.com/Maratyszcza/psimd.git'
+)
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+)
+
+prepare() {
+ cd "$pkgname"
+ _submodule_list="pybind11 nccl cnmem cub eigen googletest nervanagpu benchmark
+ protobuf android-cmake ios-cmake NNPACK gloo NNPACK_deps/pthreadpool
+ NNPACK_deps/FXdiv NNPACK_deps/FP16 NNPACK_deps/psimd"
+ git submodule init
+ for _submodule in $_submodule_list
+ do
+ _submodule_dir="submodule-$(printf "%s" "${_submodule}" | tr '/' '-')"
+ git config "submodule.third_party/${_submodule}.url" "${srcdir}/${_submodule_dir}"
+ done
+ git submodule update
+}
+
+pkgver() {
+ cd "$pkgname"
+
+ # git, tags available
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
+}
+
+build() {
+ cd "$pkgname"
+ mkdir -p build
+ cd build
+
+ cmake \
+ -DBLAS:STRING=Eigen \
+ \
+ -DBUILD_BINARY:BOOL=ON \
+ -DBUILD_PYTHON:BOOL=ON \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ \
+ -DBUILD_TEST:BOOL=OFF \
+ \
+ -DCAFFE2_CPU_FLAGS:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DCMAKE_COLOR_MAKEFILE:BOOL=ON \
+ -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 \
+ -DCMAKE_C_COMPILER=/usr/bin/gcc-5 \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=NO \
+ -DCMAKE_SKIP_RPATH:BOOL=NO \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=FALSE \
+ \
+ -DCUDA_64_BIT_DEVICE_CODE:BOOL=ON \
+ -DCUDA_ARCH_NAME:STRING=Auto \
+ -DCUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON \
+ -DCUDA_BUILD_CUBIN:BOOL=OFF \
+ -DCUDA_BUILD_EMULATION:BOOL=OFF \
+ -DCUDA_HOST_COMPILATION_CPP:BOOL=ON \
+ -DCUDA_HOST_COMPILER:FILEPATH=/usr/bin/gcc-5 \
+ -DCUDA_NVCC_EXECUTABLE:FILEPATH=/opt/cuda/bin/nvcc \
+ -DCUDA_PROPAGATE_HOST_FLAGS:BOOL=ON \
+ -DCUDA_SDK_ROOT_DIR:PATH=/opt/cuda \
+ -DCUDA_SEPARABLE_COMPILATION:BOOL=OFF \
+ -DCUDA_TOOLKIT_INCLUDE:PATH=/opt/cuda/include \
+ -DCUDA_TOOLKIT_ROOT_DIR:PATH=/opt/cuda \
+ -DCUDA_USE_STATIC_CUDA_RUNTIME:BOOL=OFF \
+ -DCUDA_VERBOSE_BUILD:BOOL=OFF \
+ -DCUDA_VERSION:STRING=8.0 \
+ -DCUDNN_INCLUDE_DIR:PATH=/opt/cuda/include \
+ -DCUDNN_ROOT_DIR:PATH=/opt/cuda \
+ \
+ -DGLOO_STATIC_OR_SHARED:STRING=STATIC \
+ -DNCCL_INCLUDE_DIR:PATH=/opt/cuda/include \
+ -DNCCL_LIBRARY:FILEPATH=/opt/cuda/lib64/libnccl.so \
+ -DNCCL_ROOT_DIR:PATH=/opt/cuda \
+ \
+ -DOpenCV_DIR:PATH=/usr/share/OpenCV \
+ \
+ -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2.7 \
+ -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 \
+ -DPYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.so \
+ \
+ -DUSE_CNMEM:BOOL=OFF \
+ -DUSE_CUDA:BOOL=ON \
+ -DUSE_GFLAGS:BOOL=ON \
+ -DUSE_GLOG:BOOL=ON \
+ -DUSE_GLOO:BOOL=ON \
+ -DUSE_LEVELDB:BOOL=ON \
+ -DUSE_LITE_PROTO:BOOL=OFF \
+ -DUSE_LMDB:BOOL=ON \
+ -DUSE_MPI:BOOL=ON \
+ -DUSE_NCCL:BOOL=ON \
+ -DUSE_NERVANA_GPU:BOOL=ON \
+ -DUSE_NNPACK:BOOL=OFF \
+ -DUSE_OPENCV:BOOL=ON \
+ -DUSE_OPENMP:BOOL=ON \
+ -DUSE_REDIS:BOOL=ON \
+ -DUSE_ROCKSDB:BOOL=OFF \
+ -DUSE_THREADS:BOOL=ON \
+ -DUSE_ZMQ:BOOL=ON \
+ \
+ -Wno-dev \
+ ..
+
+ # NOTE:
+ # The recommended approach of running make in build() and make install in
+ # package() produces two compilations (being the second one unnecessary).
+ # A workaround is to suppress make in build() and run only make install
+ # in package().
+
+ #make
+}
+
+package() {
+ cd "${pkgname}/build"
+ make DESTDIR="$pkgdir" install
+
+ # directories creation
+ mkdir -p "${pkgdir}/usr/lib/python2.7/site-packages"
+ mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ # move/rename folders to the right location
+ mv -f "${pkgdir}/usr/binaries" "${pkgdir}/usr/bin"
+ mv -f "${pkgdir}/usr/caffe" "${pkgdir}/usr/lib/python2.7/site-packages"
+ mv -f "${pkgdir}/usr/caffe2" "${pkgdir}/usr/lib/python2.7/site-packages"
+
+ # license
+ cd "${srcdir}/${pkgname}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m644 "PATENTS" "${pkgdir}/usr/share/licenses/${pkgname}/PATENTS"
+}