summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-08-22 17:51:53 +0000
committerDaniel Bermond2018-08-22 17:59:41 +0000
commit0c0fd56382d113a988a50ca1efaf06d093deb829 (patch)
tree2bddec05b78d280e6fe6219f56ac40f763193fd5
parent5d71dff79fe9e2ee23b0528cbdee59062a09e754 (diff)
downloadaur-0c0fd56382d113a988a50ca1efaf06d093deb829.tar.gz
Package now provides the non-cuda version
This package now provides the non-cuda version (as known as the 'cpy only' build). If you want caffe2 with cuda support, use package caffe2-cuda-git. This new package naming schema will better reflect the package contents. This conforms to tensorflow package naming from the official repositories.
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD92
2 files changed, 42 insertions, 68 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8778f5f397b..70ddab215d0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,20 @@
pkgbase = caffe2-git
- pkgdesc = A new lightweight, modular, and scalable deep learning framework (git version, gpu enabled)
- pkgver = 0.8.2.r12437.g3d6015db0
+ pkgdesc = A new lightweight, modular, and scalable deep learning framework (git version)
+ pkgver = 0.8.2.r12850.gfbd718994
pkgrel = 1
epoch = 1
url = http://caffe2.ai/
+ arch = i686
arch = x86_64
license = BSD
makedepends = git
makedepends = cmake
- makedepends = gcc54
depends = google-glog
depends = protobuf
depends = lapack
depends = python
depends = python-numpy
depends = python-protobuf
- depends = cuda
- depends = cudnn
depends = gflags
depends = gtest
depends = openmp
@@ -27,6 +25,9 @@ pkgbase = caffe2-git
depends = snappy
depends = zeromq
depends = hiredis
+ depends = ocl-icd
+ depends = opencv
+ depends = gtk3
depends = ffmpeg
depends = python-flask
depends = python-future
@@ -50,13 +51,12 @@ pkgbase = caffe2-git
depends = python-leveldb
depends = python-lmdb
provides = caffe2
- conflicts = caffe
- conflicts = caffe-cpu
- conflicts = caffe-git
- conflicts = caffe-cpu-git
conflicts = caffe2
+ conflicts = caffe2-cuda
+ conflicts = caffe2-cuda-git
conflicts = caffe2-cpu
conflicts = caffe2-cpu-git
+ replaces = caffe2-cpu-git
options = !emptydirs
source = pytorch-git::git+https://github.com/pytorch/pytorch.git
source = caffe2-submodule-catch::git+https://github.com/catchorg/Catch2.git
diff --git a/PKGBUILD b/PKGBUILD
index 17b571e1b00..42febb19440 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,36 @@
# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
pkgname=caffe2-git
-pkgver=0.8.2.r12437.g3d6015db0
+pkgver=0.8.2.r12850.gfbd718994
pkgrel=1
epoch=1
-pkgdesc='A new lightweight, modular, and scalable deep learning framework (git version, gpu enabled)'
-arch=('x86_64')
+pkgdesc='A new lightweight, modular, and scalable deep learning framework (git version)'
+arch=('i686' 'x86_64')
url='http://caffe2.ai/'
license=('BSD')
depends=(
# official repositories:
# required:
'google-glog' 'protobuf' 'lapack' 'python' 'python-numpy' 'python-protobuf'
- 'cuda' 'cudnn'
# not required but enabled in build:
'gflags' 'gtest' 'openmp' 'leveldb' 'lmdb' 'numactl' 'openmpi' 'snappy'
- 'zeromq' 'hiredis' 'ffmpeg'
+ 'zeromq' 'hiredis' 'ocl-icd' 'opencv' 'gtk3' 'ffmpeg'
# python:
'python-flask' 'python-future' 'graphviz' 'python-hypothesis'
'python-jupyter_core' 'python-matplotlib' 'python-pydot' 'python-yaml'
'python-requests' 'python-scipy' 'python-setuptools' 'python-six'
'python-tornado' 'python-gflags' 'python-pyzmq'
# AUR:
- # not required and disabled in build:
+ # not required but enabled in build:
'libibverbs'
# python:
'python-nvd3' 'python-scikit-image' 'python-glog' 'python-leveldb'
'python-lmdb'
)
-makedepends=('git' 'cmake' 'gcc54')
+makedepends=('git' 'cmake')
provides=('caffe2')
-conflicts=('caffe' 'caffe-cpu' 'caffe-git' 'caffe-cpu-git'
- 'caffe2' 'caffe2-cpu' 'caffe2-cpu-git')
+conflicts=('caffe2' 'caffe2-cuda' 'caffe2-cuda-git' 'caffe2-cpu' 'caffe2-cpu-git')
+replaces=('caffe2-cpu-git')
options=('!emptydirs')
source=(
# main source:
@@ -97,6 +96,9 @@ sha256sums=('SKIP'
prepare() {
cd pytorch-git
+ local _submodule
+ local _submodule_dir
+
local _submodule_list="catch nanopb pybind11 cub eigen googletest nervanagpu benchmark \
protobuf ios-cmake NNPACK gloo NNPACK_deps/pthreadpool \
NNPACK_deps/FXdiv NNPACK_deps/FP16 NNPACK_deps/psimd zstd \
@@ -109,24 +111,23 @@ prepare() {
for _submodule in $_submodule_list
do
- local _submodule_dir="caffe2-submodule-${_submodule/\//-}"
+ _submodule_dir="caffe2-submodule-${_submodule/\//-}"
git config --local "submodule.third_party/${_submodule}.url" "${srcdir}/${_submodule_dir}"
done
git submodule update
-
- # fix build if eigen is installed (use eigen from git submodule)
- local _eigen=' message(STATUS "Using Eigen third party subdirectory for compatibility.")'
- sed -i '/find_package(Eigen3)/s/^/#/' cmake/Dependencies.cmake
- sed -i "/Did[[:space:]]not[[:space:]]find[[:space:]]system[[:space:]]Eigen/s/.*/${_eigen}/" cmake/Dependencies.cmake
}
pkgver() {
cd pytorch-git
- local _version="$(head -n1 caffe2/VERSION_NUMBER)"
- local _revision="$( git rev-list --count HEAD)"
- local _shorthash="$(git rev-parse --short HEAD)"
+ local _version
+ local _revision
+ local _shorthash
+
+ _version="$(head -n1 caffe2/VERSION_NUMBER)"
+ _revision="$( git rev-list --count HEAD)"
+ _shorthash="$(git rev-parse --short HEAD)"
printf '%s.r%s.g%s' "$_version" "$_revision" "$_shorthash"
}
@@ -134,7 +135,8 @@ pkgver() {
build() {
cd pytorch-git
- local _pythonver="$(python --version | sed 's/^Python[[:space:]]//' | grep -o '^[0-9]*\.[0-9]*')"
+ local _pythonver
+ _pythonver="$(python --version | awk '{ print $2 }' | grep -o '^[0-9]*\.[0-9]*')"
mkdir -p build
cd build
@@ -149,36 +151,12 @@ build() {
\
-DBUILD_TEST:BOOL='OFF' \
\
- -DCMAKE_COLOR_MAKEFILE:BOOL='ON' \
- -DCMAKE_CXX_COMPILER='/usr/bin/g++-5' \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS/-fno-plt/}" \
- -DCMAKE_C_COMPILER='/usr/bin/gcc-5' \
- -DCMAKE_C_FLAGS:STRING="${CFLAGS/-fno-plt/}" \
-DCMAKE_INSTALL_LIBDIR:PATH='lib' \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL='NO' \
-DCMAKE_SKIP_RPATH:BOOL='NO' \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='FALSE' \
\
- -DCUDA_ARCH_NAME:STRING='Auto' \
- -DCUDA_64_BIT_DEVICE_CODE:BOOL='ON' \
- -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' \
- -DCUDNN_INCLUDE_DIR:PATH='/opt/cuda/include' \
- -DCUDNN_LIBRARY:FILEPATH='/opt/cuda/lib64/libcudnn.so' \
- -DCUDNN_ROOT_DIR:PATH='/opt/cuda' \
- \
-DGLOO_STATIC_OR_SHARED:STRING='STATIC' \
\
-DOpenCV_DIR:PATH='/usr/share/OpenCV' \
@@ -188,10 +166,10 @@ build() {
-DPYTHON_LIBRARY:FILEPATH="/usr/lib/libpython${_pythonver}m.so" \
\
-DUSE_ACL:BOOL='OFF' \
- -DUSE_ASAN:BOOL='OFF' \
+ -DUSE_ASAN:BOOL='ON' \
-DUSE_ATEN:BOOL='OFF' \
- -DUSE_CUDA:BOOL='ON' \
- -DUSE_CUDNN:BOOL='ON' \
+ -DUSE_CUDA:BOOL='OFF' \
+ -DUSE_CUDNN:BOOL='OFF' \
-DUSE_DISTRIBUTED:BOOL='OFF' \
-DUSE_DISTRIBUTED_MW:BOOL='OFF' \
-DUSE_FFMPEG:BOOL='ON' \
@@ -209,15 +187,15 @@ build() {
-DUSE_MKLML:BOOL='OFF' \
-DUSE_MOBILE_OPENGL:BOOL='OFF' \
-DUSE_MPI:BOOL='ON' \
- -DUSE_NCCL:BOOL='ON' \
+ -DUSE_NCCL:BOOL='OFF' \
-DUSE_NERVANA_GPU:BOOL='OFF' \
-DUSE_NNAPI:BOOL='OFF' \
-DUSE_NNPACK:BOOL='ON' \
-DUSE_NUMA:BOOL='ON' \
- -DUSE_NVRTC:BOOL='ON' \
+ -DUSE_NVRTC:BOOL='OFF' \
-DUSE_OBSERVERS:BOOL='ON' \
-DUSE_OPENCL:BOOL='OFF' \
- -DUSE_OPENCV:BOOL='OFF' \
+ -DUSE_OPENCV:BOOL='ON' \
-DUSE_OPENMP:BOOL='ON' \
-DUSE_PROF:BOOL='OFF' \
-DUSE_REDIS:BOOL='ON' \
@@ -232,13 +210,7 @@ build() {
-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
+ make
}
package() {
@@ -247,9 +219,11 @@ package() {
make DESTDIR="$pkgdir" install
# remove unneeded files
- local _exclude_dirs=($(find "$pkgdir" -mindepth 1 -maxdepth 1 -type d ! -name 'usr'))
- local _exclude_dirs+=($(find "${pkgdir}/usr/include" -mindepth 1 -maxdepth 1 -type d ! -name 'caffe*'))
- local _exclude_libs=($(find -L "${pkgdir}/usr/lib" -maxdepth 1 -type f ! -name 'libcaffe*'))
+ local _entry
+ local _exclude_dirs
+ local _exclude_libs
+ _exclude_dirs=($(find "${pkgdir}/usr/include" -mindepth 1 -maxdepth 1 -type d ! -name 'caffe*'))
+ _exclude_libs=($(find -L "${pkgdir}/usr/lib" -maxdepth 1 -type f ! -name 'libcaffe*'))
rm -f "$pkgdir"/usr/bin/{protoc,unzstd,zstd{cat,mt,}}
rm -f "$pkgdir"/usr/include/{*.h,*.py}
rm -rf "$pkgdir"/usr/lib/cmake/protobuf