Search code examples
tensorflowcentospackageredhat

TensorFlow C++ prebuilt repo for CentOS/Fedora/Red Hat


I need TensorFlow prebuilt library for CentOS as all of my servers are CentOS, however, I can find only the prebuilt for Ubuntu on the official tensorflow.org web site: https://www.tensorflow.org/install/pip#available-packages

Already googled but couldn't find any repos. I tried to build with bazel as guided on tensorflow.org but it's just taking too long to build, hours! Any updated CentOS/Fedoda/Red Hat repos with tensorflow package available? Personal repos are OK.

Edit: The official TensorFlow prebuilt is Python only, this is sad. I put down my expectation a bit, TensorFlow C++ repo for Ubuntu is also OK, I can create Ubuntu server, any TensorFlow C++ Ubuntu PPA?


Solution

  • There seems no prebuilt TensorFlow C++ library available, either download or through Linux repos. Even the official prebuilt library by Google on https://www.tensorflow.org/install/pip is prebuilt for Python.

    The library in Docker image provided on tensorflow.org https://www.tensorflow.org/install/docker is also for Python only.

    There are guides how to build TensorFlow C++ libary here:

    The one with normal Bazel build process requires manual copying header files and .so files to proper directories. The one with CMake & Bazel makes everything available and ready to use. However, the build process is EXACTLY very slow, a few hours (~4 hours on my 2-core test server).

    If one doesn't mind using Docker, there are Docker images with ready-to-use C++ headers & libs: https://github.com/FloopCZ/tensorflow_cc#docker