mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-13 04:41:38 +00:00
Extend Makefile.configs and define several variables for make to use derived from 'gcc -dumpmachine'. In particular: - ARCH as the architecture, e.g., x86_64 - ARCH_LONG as the long version of the architecture, e.g., x86_64-linux-gnu - ARCH_LIBDIR as the directory where libraries are located, e.g., /lib/x86_64-linux-gnu In Makefiles and manifest templates, replace the hard-coded x86_64-linux_gnu and /lib/x86_64-linux-gnu through these variables. Extend the already existing sed scripts to replace the necessary variables.
This example demonstrates how to run TensorFlow (v1.9) Lite's label_image example on Graphene. Reads an input image image.bmp from the current directory and uses TensorFlow lite and the Inception v3 model to label the image.
Known limitations:
- Tested on Ubuntu 16.04 with Graphene commit 030a088. Ubuntu 18.04 should work, but have not tested.
To install build dependencies on Ubuntu 16.04 there is a convenience target invoked with make install-dependencies-ubuntu. This also serves as a starting point to figure out which packages to install on newer releases of Ubuntu.
To build TensorFlow and Graphene artifacts:
- without SGX do
make - with SGX do
make SGX=1
To run the image labeling example of TensorFlow:
- without Graphene do
make run-native - with Graphene do
make run-graphene - with Graphene-SGX do
make SGX=1 run-graphene