Date: Saturday, September 9, 2017 @ 09:37:52 Author: svenstaro Revision: 256639
archrelease: copy trunk to community-x86_64 Added: tensorflow/repos/community-x86_64/PKGBUILD (from rev 256638, tensorflow/trunk/PKGBUILD) Deleted: tensorflow/repos/community-x86_64/PKGBUILD ----------+ PKGBUILD | 243 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 120 insertions(+), 123 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2017-09-09 09:37:39 UTC (rev 256638) +++ PKGBUILD 2017-09-09 09:37:52 UTC (rev 256639) @@ -1,123 +0,0 @@ -# Maintainer: Sven-Hendrik Haase <s...@lutzhaase.com> -# Contributor: Adria Arrufat (archdria) <adria.arrufat+...@protonmail.ch> -# Contributor: Thibault Lorrain (fredszaq) <freds...@gmail.com> - -pkgbase=tensorflow -pkgname=(tensorflow tensorflow-cuda python-tensorflow python-tensorflow-cuda) -pkgver=1.3.0 -pkgrel=3 -pkgdesc="Library for computation using data flow graphs for scalable machine learning" -url="https://www.tensorflow.org/" -license=('Apache2') -arch=('x86_64') -makedepends=('git' 'bazel' 'python-numpy' 'gcc5' 'cuda' - 'cudnn6' 'python-pip' 'python-wheel' 'python-setuptools') -optdepends=('tensorboard: Tensorflow visualization toolkit') -source=("https://github.com/tensorflow/tensorflow/archive/v${pkgver}.tar.gz") -sha512sums=('b74228a13537e4cbcf8781167480a0bccb2c1ecf7bf21a02e35a182e073395f919645205036fd2193d5a186cfa8a869ba32c04fa5bd8f82cbe0ad8e56926398b') - -prepare() { - cp -r tensorflow-${pkgver} tensorflow-${pkgver}-cuda - # These environment variables influence the behavior of the configure call below. - export TF_NEED_MKL=0 - export PYTHON_BIN_PATH=/usr/bin/python - export USE_DEFAULT_PYTHON_LIB_PATH=1 - export CC_OPT_FLAGS="-march=x86-64" - export TF_NEED_JEMALLOC=1 - export TF_NEED_GCP=0 - export TF_NEED_HDFS=0 - export TF_ENABLE_XLA=1 - export TF_NEED_VERBS=0 - export TF_NEED_OPENCL=0 - export TF_NEED_MPI=0 -} - -build() { - cd ${srcdir}/tensorflow-${pkgver} - - export TF_NEED_CUDA=0 - - ./configure - bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package - bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmp - - cd ${srcdir}/tensorflow-${pkgver}-cuda - - export TF_NEED_CUDA=1 - export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-5 - # For next version instead of the gcc-5 stuff: - export TF_CUDA_CLANG=0 - # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang - export CUDA_TOOLKIT_PATH=/opt/cuda - export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') - export CUDNN_INSTALL_PATH=/opt/cudnn6 - export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h) - export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1 - - ./configure - bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package - bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcuda -} - -package_tensorflow() { - cd ${srcdir}/tensorflow-${pkgver} - - tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver} - install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc - install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so - install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} - -package_tensorflow-cuda() { - depends=(cuda cudnn6) - conflicts=(tensorflow) - provides=(tensorflow) - - cd ${srcdir}/tensorflow-${pkgver}-cuda - - tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver} - install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc - install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so - install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} - -package_python-tensorflow() { - depends=(python python-protobuf) - - cd ${srcdir}/tensorflow-${pkgver} - - WHEEL_PACKAGE=$(find ${srcdir}/tmp -name "tensor*.whl") - pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies - find ${pkgdir} -name __pycache__ -exec rm -r {} + - - # tensorboard has been separated from upstream but they still install it with - # tensorflow. I don't know what kind of sense that makes but we have to clean - # it out from this pacakge. - rm -rf ${pkgdir}/usr/bin/tensorboard - - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} - -package_python-tensorflow-cuda() { - depends=(python cuda cudnn6 python-pycuda python-protobuf) - conflicts=(python-tensorflow) - provides=(python-tensorflow) - - cd ${srcdir}/tensorflow-${pkgver}-cuda - - WHEEL_PACKAGE=$(find ${srcdir}/tmpcuda -name "tensor*.whl") - pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies - find ${pkgdir} -name __pycache__ -exec rm -r {} + - - # tensorboard has been separated from upstream but they still install it with - # tensorflow. I don't know what kind of sense that makes but we have to clean - # it out from this pacakge. - rm -rf ${pkgdir}/usr/lib/python3.6/site-packages/tensorflow/contrib/tensorboard - rm -rf ${pkgdir}/usr/bin/tensorboard - - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE -} - -# vim:set ts=2 sw=2 et: Copied: tensorflow/repos/community-x86_64/PKGBUILD (from rev 256638, tensorflow/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2017-09-09 09:37:52 UTC (rev 256639) @@ -0,0 +1,120 @@ +# Maintainer: Sven-Hendrik Haase <s...@lutzhaase.com> +# Contributor: Adria Arrufat (archdria) <adria.arrufat+...@protonmail.ch> +# Contributor: Thibault Lorrain (fredszaq) <freds...@gmail.com> + +pkgbase=tensorflow +pkgname=(tensorflow tensorflow-cuda python-tensorflow python-tensorflow-cuda) +pkgver=1.3.0 +pkgrel=4 +pkgdesc="Library for computation using data flow graphs for scalable machine learning" +url="https://www.tensorflow.org/" +license=('Apache2') +arch=('x86_64') +makedepends=('git' 'bazel' 'python-numpy' 'gcc5' 'cuda' + 'cudnn6' 'python-pip' 'python-wheel' 'python-setuptools') +optdepends=('tensorboard: Tensorflow visualization toolkit') +source=("https://github.com/tensorflow/tensorflow/archive/v${pkgver}.tar.gz") +sha512sums=('b74228a13537e4cbcf8781167480a0bccb2c1ecf7bf21a02e35a182e073395f919645205036fd2193d5a186cfa8a869ba32c04fa5bd8f82cbe0ad8e56926398b') + +prepare() { + cp -r tensorflow-${pkgver} tensorflow-${pkgver}-cuda + # These environment variables influence the behavior of the configure call below. + export TF_NEED_MKL=0 + export PYTHON_BIN_PATH=/usr/bin/python + export USE_DEFAULT_PYTHON_LIB_PATH=1 + export CC_OPT_FLAGS="-march=x86-64" + export TF_NEED_JEMALLOC=1 + export TF_NEED_GCP=0 + export TF_NEED_HDFS=0 + export TF_ENABLE_XLA=1 + export TF_NEED_VERBS=0 + export TF_NEED_OPENCL=0 + export TF_NEED_MPI=0 +} + +build() { + cd ${srcdir}/tensorflow-${pkgver} + + export TF_NEED_CUDA=0 + + ./configure + bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package + bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmp + + cd ${srcdir}/tensorflow-${pkgver}-cuda + + export TF_NEED_CUDA=1 + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-5 + # For next version instead of the gcc-5 stuff: + export TF_CUDA_CLANG=0 + # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang + export CUDA_TOOLKIT_PATH=/opt/cuda + export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p') + export CUDNN_INSTALL_PATH=/opt/cudnn6 + export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h) + export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1 + + ./configure + bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package + bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcuda +} + +package_tensorflow() { + cd ${srcdir}/tensorflow-${pkgver} + + tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver} + install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc + install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so + install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} + +package_tensorflow-cuda() { + depends=(cuda cudnn6) + conflicts=(tensorflow) + provides=(tensorflow) + + cd ${srcdir}/tensorflow-${pkgver}-cuda + + tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver} + install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc + install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/libtensorflow.so + install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/tensorflow/c/c_api.h + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} + +package_python-tensorflow() { + depends=(python python-protobuf) + + cd ${srcdir}/tensorflow-${pkgver} + + WHEEL_PACKAGE=$(find ${srcdir}/tmp -name "tensor*.whl") + pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies + + # tensorboard has been separated from upstream but they still install it with + # tensorflow. I don't know what kind of sense that makes but we have to clean + # it out from this pacakge. + rm -rf ${pkgdir}/usr/bin/tensorboard + + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} + +package_python-tensorflow-cuda() { + depends=(python cuda cudnn6 python-pycuda python-protobuf) + conflicts=(python-tensorflow) + provides=(python-tensorflow) + + cd ${srcdir}/tensorflow-${pkgver}-cuda + + WHEEL_PACKAGE=$(find ${srcdir}/tmpcuda -name "tensor*.whl") + pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies + + # tensorboard has been separated from upstream but they still install it with + # tensorflow. I don't know what kind of sense that makes but we have to clean + # it out from this pacakge. + rm -rf ${pkgdir}/usr/bin/tensorboard + + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} + +# vim:set ts=2 sw=2 et: