Commit 4cf626b1 authored by Bart Ribbers's avatar Bart Ribbers

WIP: testing/tensorflow: new aport

parent efa3b6ab
Pipeline #62747 failed with stages
in 18 minutes and 55 seconds
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=deepspeech
pkgver=0.9.2
pkgrel=0
pkgdesc="An open source embedded (offline, on-device) speech-to-text engine"
url="https://github.com/mozilla/DeepSpeech"
# Blocked on all other arches by tensorflow
arch="x86_64 aarch64"
license="MPL-2.0"
depends="python3"
makedepends="
py3-setuptools
tensorflow
"
source="https://github.com/mozilla/DeepSpeech/archive/v$pkgver/deepspeech-v$pkgver.tar.gz"
builddir="$srcdir/DeepSpeech-$pkgver"
build() {
python3 setup.py build
}
check() {
python3 setup.py test
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="8164662695f446eef211c129f4669f482245e17ccb58de05234e3d872350198799d4abf03beba9b55457a73d630b7382b3f553dd4a797bc960ca27ca3989c055 deepspeech-v0.9.2.tar.gz"
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=tensorflow
pkgver=2.3.1
pkgrel=0
pkgdesc="An Open Source Machine Learning Framework for Everyone"
url="https://tensorflow.org/"
# Blocked on all other arches because of bazel3
arch="x86_64 aarch64"
license="Apache-2.0"
makedepends="
bash
bazel3
curl-dev
giflib-dev
icu-dev
libexecinfo-dev
libjpeg-turbo-dev
libpng-dev
linux-headers
lmdb-dev
openssl-dev
py3-numpy-dev
py3-pybind11-dev
python3-dev
"
source="https://github.com/tensorflow/tensorflow/archive/v$pkgver/tensorflow-v$pkgver.tar.gz"
# Build process downloads several files. See Gentoo for example to do it offline
# https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/tensorflow/tensorflow-2.3.1-r1.ebuild
options="net"
prepare() {
default_prepare
# Allow any bazel version
echo "*" > .bazelversion
# These environment variables influence the behaviour of the configure call in build()
export PYTHON_BIN_PATH=/usr/bin/python3
export USE_DEFAULT_PYTHON_LIB_PATH=1
export TF_NEED_JEMALLOC=1
export TF_NEED_KAFKA=1
export TF_NEED_OPENCL_SYCL=0
export TF_NEED_AWS=1
export TF_NEED_GCP=1
export TF_NEED_HDFS=1
export TF_NEED_S3=1
export TF_ENABLE_XLA=1
export TF_NEED_GDR=0
export TF_NEED_VERBS=0
export TF_NEED_OPENCL=0
export TF_NEED_MPI=0
export TF_NEED_TENSORRT=0
export TF_NEED_NGRAPH=0
export TF_NEED_IGNITE=0
export TF_NEED_ROCM=0
# See https://github.com/tensorflow/tensorflow/blob/master/third_party/systemlibs/syslibs_configure.bzl
export TF_SYSTEM_LIBS="boringssl,curl,cython,gif,icu,libjpeg_turbo,lmdb,nasm,pcre,png,pybind11,zlib"
export TF_SET_ANDROID_WORKSPACE=0
export TF_DOWNLOAD_CLANG=0
export TF_NCCL_VERSION=2.7
export TF_IGNORE_MAX_BAZEL_VERSION=1
export NCCL_INSTALL_PATH=/usr
export GCC_HOST_COMPILER_PATH=/usr/bin/gcc
export HOST_C_COMPILER=/usr/bin/gcc
export HOST_CXX_COMPILER=/usr/bin/g++
export TF_NEED_CUDA=0
export CC_OPT_FLAGS="-march=native"
export BAZEL_ARGS="--config=mkl"
}
build() {
./configure
bazel build //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package "$srcdir"/tmp
}
package() {
WHEEL_PACKAGE=$(find "$srcdir"/$1 -name "tensor*.whl")
pip install --ignore-installed --upgrade --root "$pkgdir"/ $WHEEL_PACKAGE --no-dependencies
}
sha512sums="e497ef4564f50abf9f918be4522cf702f4cf945cb1ebf83af1386ac4ddc7373b3ba70c7f803f8ca06faf2c6b5396e60b1e0e9b97bfbd667e733b08b6e6d70ef0 tensorflow-v2.3.1.tar.gz"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment