aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorJohannes Schoepfer <slackbuilds@schoepfer.info>2024-04-19 21:55:28 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-04-27 09:28:29 +0700
commitff84aa32301865ec5d9a86d1789cf03d0f914b66 (patch)
tree1433cfccfb9e4e2242ddf6c85c6e0d84700e1858 /libraries
parent546875d37408ac032996077d5eb3cff30b0a241f (diff)
libraries/openvino: Added (AI toolkit).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/openvino/README6
-rw-r--r--libraries/openvino/openvino.SlackBuild140
-rw-r--r--libraries/openvino/openvino.info14
-rw-r--r--libraries/openvino/slack-desc19
4 files changed, 179 insertions, 0 deletions
diff --git a/libraries/openvino/README b/libraries/openvino/README
new file mode 100644
index 000000000000..0261eda986e8
--- /dev/null
+++ b/libraries/openvino/README
@@ -0,0 +1,6 @@
+OpenVINO is an open-source toolkit for optimizing and deploying AI
+inference.
+
+The dependency oneTBB needs to be compiled with its optional
+dependency hwloc, otherwise libtbbbind-2.5 is missing and openvino
+will fail to build.
diff --git a/libraries/openvino/openvino.SlackBuild b/libraries/openvino/openvino.SlackBuild
new file mode 100644
index 000000000000..fe9893193a13
--- /dev/null
+++ b/libraries/openvino/openvino.SlackBuild
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+# Slackware build script for openvino
+
+# Copyright 2024 Johannes Schoepfer, Germany
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=openvino
+VERSION=${VERSION:-2024.0.0}
+VERSION_PROTOBUF=3.21.12
+VERSION_FLATBUFFERS=24.3.25
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
+cd $PRGNAM-$VERSION
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} + -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} +
+
+# The protobuf3 version from SBo makes the build fail
+(
+cd thirdparty/protobuf/
+rmdir protobuf
+tar vxf $CWD/protobuf-$VERSION_PROTOBUF.tar.gz
+ln -s protobuf-$VERSION_PROTOBUF protobuf
+)
+# Flatbuffers from SBo comes without static lib
+(
+cd thirdparty/flatbuffers/
+rmdir flatbuffers
+tar vxf $CWD/flatbuffers-$VERSION_FLATBUFFERS.tar.gz
+ln -s flatbuffers-$VERSION_FLATBUFFERS flatbuffers
+)
+
+mkdir -p build
+cd build
+ unshare -n cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_PREFIX=/usr/share/openvino \
+ -DENABLE_SYSTEM_PUGIXML=ON \
+ -DENABLE_SYSTEM_SNAPPY=ON \
+ -DENABLE_SYSTEM_OPENCL=ON \
+ -DENABLE_SYSTEM_TBB=ON \
+ -DENABLE_SYSTEM_PROTOBUF=OFF \
+ -DENABLE_SYSTEM_OPENCL=ON \
+ -DENABLE_JS=OFF \
+ -DENABLE_SSE42=OFF \
+ -DENABLE_SAMPLES=OFF \
+ -DENABLE_INTEL_CPU=OFF \
+ -DENABLE_INTEL_GPU=OFF \
+ -DENABLE_OV_ONNX_FRONTEND=OFF \
+ -Wno-dev \
+ -DCMAKE_BUILD_TYPE=Release ..
+ cmake --build .
+ make install/strip DESTDIR=$PKG
+cd ..
+
+rmdir $PKG/usr/share/openvino/samples/cpp/thirdparty/gflags/gflags
+rmdir $PKG/usr/share/openvino/samples/cpp/thirdparty/nlohmann_json
+
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/libraries/openvino/openvino.info b/libraries/openvino/openvino.info
new file mode 100644
index 000000000000..712cb0ba7d95
--- /dev/null
+++ b/libraries/openvino/openvino.info
@@ -0,0 +1,14 @@
+PRGNAM="openvino"
+VERSION="2024.0.0"
+HOMEPAGE="https://github.com/openvinotoolkit/openvino/"
+DOWNLOAD="https://github.com/openvinotoolkit/openvino/archive/2024.0.0/openvino-2024.0.0.tar.gz \
+ https://github.com/protocolbuffers/protobuf/archive/v3.21.12/protobuf-3.21.12.tar.gz \
+ https://github.com/google/flatbuffers/archive/v24.3.25/flatbuffers-24.3.25.tar.gz"
+MD5SUM="5fec9788393e2f48033e6acf839ee11f \
+ d38562490234d8080bdbe8eb7baf937a \
+ f28f12fc16c72f4e7c22066a35405c3a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="oneTBB xbyak pugixml snappy pybind11"
+MAINTAINER="Johannes Schoepfer"
+EMAIL="slackbuilds@schoepfer.info"
diff --git a/libraries/openvino/slack-desc b/libraries/openvino/slack-desc
new file mode 100644
index 000000000000..b4647f49b83f
--- /dev/null
+++ b/libraries/openvino/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+openvino: openvino (toolkit for optimizing and deploying AI inference)
+openvino:
+openvino: OpenVINO is an open-source toolkit for optimizing and deploying AI
+openvino: inference.
+openvino:
+openvino:
+openvino:
+openvino:
+openvino:
+openvino: https://github.com/openvinotoolkit/openvino/
+openvino: