title: How to run examples ...
If you don't want to build binaries, you can directly download from PPA with daily releases.
sudo add-apt-repository ppa:nnstreamer/ppa
sudo apt-get update
sudo apt-get install nntrainer
Note that this may install Tensorflow-Lite packaged by us.
Refer https://github.com/nnstreamer/nntrainer/blob/master/docs/getting-started.md for more info.
Install related packages before building nntrainer and examples.
- gcc/g++ >= 7 ( std=c++17 is used )
- meson >= 0.50
- libopenblas-dev and base
- tensorflow-lite >=1.14.0
- libiniparser
- libjsoncpp >=0.6.0 ( if you wand to use open AI )
- libcurl3 >=7.47 ( if you wand to use open AI )
- libgtest ( for testing )
Important build options (meson)
- enable-tizen : default false, add option for tizen build (-Denable-tizen=false)
- enable-blas : default true, add option to enable blas (-Denable-blas=true)
- enable-app : default true, add option to enable Applications (-Denable-app=true)
- install-app : default true, add option to install Applications (-Dinstall-app=true)
- use_gym : default false, add option to use openAI gym (-Duse_gym=false)
- enable-capi : default true, add option to install C-API (-Denable-capi=true)
- enable-test : default true, add option to test (-Denable-test=true)
- enable-logging : default true, add option to do logging (-Denable-logging=true)
- enable-tizen-feature-check : default true, add option to enable tizen feature check (-Denable-tizen-feature-check=true)
For example, to build and install NNTrainer and C-API,
meson --prefix=${NNTRAINER_ROOT} --sysconfdir=${NNTRAINER_ROOT} --libdir=lib --bindir=bin --includedir=include -Denable-capi=true build
Build source code
# Set your own path to install libraries and header files
$ sudo vi ~/.bashrc
export NNTRAINER_ROOT=$HOME/nntrainer
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NNTRAINER_ROOT/lib
# Include NNStreamer headers and libraries
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$NNTRAINER_ROOT/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$NNTRAINER_ROOT/include
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$NNTRAINER_ROOT/lib/pkgconfig
$ source ~/.bashrc
# Download source, then compile it.
# Build and install nntrainer
$ git clone https://github.com/nnstreamer/nntrainer.git nntrainer.git
$ meson --prefix=${NNTRAINER_ROOT} --sysconfdir=${NNTRAINER_ROOT} --libdir=lib --bindir=bin --includedir=include build
$ ninja -C build install
$ cd ..