Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit fc9c340

Browse files
authored
Merge pull request #17 from snipsco/task/tf1.3.1
Task/tf1.3.1
2 parents d45cb34 + a91c42d commit fc9c340

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Supported OS / Arch:
1212

1313
OS | Available archs
1414
---|---
15-
Debian Like | `armhf` [[deb]](https://s3.amazonaws.com/snips/tensorflow-deb/libtensorflow_1.2.1-snips-1_armhf.deb) (raspbian, crosscompiled, tested on Raspberry Pi 0, 2 & 3) <br> `amd64` [[deb]](https://s3.amazonaws.com/snips/tensorflow-deb/libtensorflow_1.2.1-snips-1_amd64.deb)
16-
Android | `arm` [[sysroot overlay]](https://s3.amazonaws.com/snips/tensorflow-android/tensorflow-android-armeabi-v7a-v1.2.1.tar.gz)
15+
Debian Like | `armhf` [[deb]](https://s3.amazonaws.com/snips/tensorflow-deb/libtensorflow_1.3.1-snips-2_armhf.deb) (raspbian, crosscompiled, tested on Raspberry Pi 0, 2 & 3) <br> `amd64` [[deb]](https://s3.amazonaws.com/snips/tensorflow-deb/libtensorflow_1.3.1-snips-2_amd64.deb)
16+
Android | `armeabi-v7a` [[sysroot overlay]](https://s3.amazonaws.com/snips/tensorflow-android/tensorflow-android-armeabi-v7a-1.3.1-snips-2.tar.gz) <br> `arm64-v8a` [[sysroot overlay]](https://s3.amazonaws.com/snips/tensorflow-android/tensorflow-android-arm64-v8a-1.3.1-snips-2.tar.gz) <br> `x86` [[sysroot overlay]](https://s3.amazonaws.com/snips/tensorflow-android/tensorflow-android-x86-1.3.1-snips-2.tar.gz) <br> `x86_64` [[sysroot overlay]](https://s3.amazonaws.com/snips/tensorflow-android/tensorflow-android-x86_64-1.3.1-snips-2.tar.gz)
1717
Archlinux | `i686` / `x86_64` use this aur [[PKGBUILD]](https://aur.archlinux.org/packages/tensorflow-git/)
1818
macOS | `x86_64` `brew install libtensorflow`
1919

@@ -47,7 +47,7 @@ Script | Description
4747
`compile.sh` | Clones and build build tensorflow for current machine. Takes the tensorflow version as a parameter
4848
`cross-compile.sh` | Generic script for cloning and building tensorflow using a cross toolchain. Launch it without args for usage
4949
`compile-arm.sh` | Clones the `raspberry/tools` repository an launches a cross compilation using the toolchain in it. Takes the tensorflow version as a parameter
50-
`compile-android.sh` | Download Android NDK and launch a crosscompilation for android using it. Takes the tensorflow version and android arch as parameters
50+
`compile-android.sh` | Download Android NDK and launch a crosscompilation for android using it. Takes the tensorflow version, android arch and package version as parameters
5151
`create-pkgconfig.sh` | Generic script for creating a pc. Launch it without args for usage
5252

5353
### Building a deb

compile-android.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
set -e
44

5-
USAGE="Usage : $0 <tensorflow version> <android arch>"
5+
USAGE="Usage : $0 <tensorflow version> <android arch> <package version>"
66

77
TENSORFLOW_VERSION=${1?$USAGE}
88
ANDROID_ARCH=${2?$USAGE}
9+
PACKAGE_VERSION=${3?$USAGE}
910

1011
BUILD_DIR=`pwd`/target
1112

@@ -20,7 +21,7 @@ NDK_ARCHIVE=$NDK_NAME-linux-x86_64.zip
2021
NDK_DIR=$BUILD_DIR/$NDK_NAME
2122

2223
# We create a dir with a tree containing the .so and a .pc file that can be overlayed over a sysroot
23-
PKG_NAME=tensorflow-android-$ANDROID_ARCH-$TENSORFLOW_VERSION
24+
PKG_NAME=tensorflow-android-$ANDROID_ARCH-$PACKAGE_VERSION
2425
PKG_DIR=$BUILD_DIR/$PKG_NAME
2526
FINAL_PKG=$PKG_DIR.tar.gz
2627

@@ -105,12 +106,14 @@ mkdir -p $SO_INSTALL_DIR
105106
mkdir -p $PKG_CONFIG_INSTALL_DIR
106107
mkdir -p $HEADER_INSTALL_DIR
107108

108-
cp $TF_SO $SO_INSTALL_DIR
109+
install -Dm755 $TF_SO $SO_INSTALL_DIR
109110

110-
cp $TF_HEADER $HEADER_INSTALL_DIR
111+
install -Dm644 $TF_HEADER $HEADER_INSTALL_DIR
111112

112113
$CREATE_PKGCONFIG "$LIB_NAME" "/$SO_INSTALL_DIR" "${TENSORFLOW_VERSION/v}" "Tensorflow C library" > $PKG_CONFIG_INSTALL_DIR/$LIB_NAME.pc
113114

115+
chmod 644 $PKG_CONFIG_INSTALL_DIR/$LIB_NAME.pc
116+
114117
cd $BUILD_DIR
115118

116119
tar -cf $FINAL_PKG $PKG_NAME/*

debian/versions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#/usr/env/bin bash
2-
export TF_VERSION="v1.2.1"
3-
export TF_DEB_VERSION="1.2.1-snips-1"
2+
export TF_VERSION="107cc777af7880c140d089e44ad898a6ba929286"
3+
export TF_DEB_VERSION="1.3.1-snips-2"
44

0 commit comments

Comments
 (0)