README.md

tensorflow_cc

This repository makes possible the usage of the TensorFlow C++ API from the outside of the TensorFlow source code folders and without the use of the Bazel build system.

This repository contains two CMake projects. The tensorflow_cc project downloads, builds and installs the TensorFlow C++ API into the operating system and the example project demonstrates its simple usage.

Docker

If you wish to start using this project right away, fetch a prebuilt image on Docker Hub!

Running the image on CPU:

docker run -it floopcz/tensorflow_cc:ubuntu-shared /bin/bash

If you also want to utilize your NVIDIA GPU, install NVIDIA Docker and run:

Ubuntu 18.04:

If you require GPU support on Ubuntu, please also install Bazel, NVIDIA CUDA Toolkit (>=9.2), NVIDIA drivers, cuDNN, and cuda-command-line-tools package. The tensorflow build script will automatically detect CUDA if it is installed in /opt/cuda or /usr/local/cuda directories.

Warning: Optimizations for Intel CPU generation >=ivybridge are enabled by default. If you have a
processor that is older than ivybridge generation, you may wish to run export CC_OPT_FLAGS="-march=native"
before the build. This command provides the best possible optimizations for your current CPU generation, but
it may cause the built library to be incompatible with older generations.