Extract from the official GitHub repository
We provide a pre-built library and a Docker image for easy installation and usage of the TensorFlow C++ API.
In order to, e.g., run TensorFlow models from C++ source code, one usually needs to build the C++ API in the form of the libtensorflow_cc.so library from source. There is no official release of the library and the build from source is only sparsely documented.
We try to remedy this current situation by providing two main components:
libtensorflow_cc.so including accompanying headers as a one-command-install deb-package. The build supports x86_64 machines running Ubuntu. See Installation.If you want to use the TensorFlow C++ API to load, inspect, and run saved models and frozen graphs in C++, we suggest that you also check out our helper library tensorflow_cpp.
Run the following from the Git repository root to mount, build and run the example application in the pre-built Docker container.
# libtensorflow_cc$
docker run --rm \
--volume $(pwd)/example:/example \
--workdir /example \
rwthika/tensorflow-cc:latest \
./build-and-run.sh
# Hello from TensorFlow C++ 2.9.2!
#
# A =
# 1 2
# 3 4
#
# x =
# 1
# 2
#
# A * x =
# 5
# 11
All images are based on the official TensorFlow Docker images and only install the TensorFlow C++ API on top of those. The resulting images therefore enable you to run TensorFlow in both Python and C++. If supported, we offer CPU-only and GPU-supporting images.
| TensorFlow Version | CPU/GPU | Image:Tag |
|---|---|---|
| 2.9.2 | GPU | rwthika/tensorflow-cc:latest-gpu |
| 2.9.2 | CPU | rwthika/tensorflow-cc:latest |
| TensorFlow Version | Image:Tag |
|---|---|
| latest | rwthika/tensorflow-cc:latest-gpu |
| 2.9.2 | rwthika/tensorflow-cc:2.9.2-gpu |
| 2.9.1 | rwthika/tensorflow-cc:2.9.1-gpu |
| 2.9.0 | rwthika/tensorflow-cc:2.9.0-gpu |
| 2.8.3 | rwthika/tensorflow-cc:2.8.3-gpu |
| 2.8.2 | rwthika/tensorflow-cc:2.8.2-gpu |
| 2.8.1 | rwthika/tensorflow-cc:2.8.1-gpu |
| 2.8.0 | rwthika/tensorflow-cc:2.8.0-gpu |
| 2.7.4 | rwthika/tensorflow-cc:2.7.4-gpu |
| 2.7.3 | rwthika/tensorflow-cc:2.7.3-gpu |
| 2.7.2 | rwthika/tensorflow-cc:2.7.2-gpu |
| 2.7.1 | rwthika/tensorflow-cc:2.7.1-gpu |
| 2.7.0 | rwthika/tensorflow-cc:2.7.0-gpu |
| TensorFlow Version | Image:Tag |
|---|---|
| latest | rwthika/tensorflow-cc:latest |
| 2.9.2 | rwthika/tensorflow-cc:2.9.2 |
| 2.9.1 | rwthika/tensorflow-cc:2.9.1 |
| 2.9.0 | rwthika/tensorflow-cc:2.9.0 |
| 2.8.3 | rwthika/tensorflow-cc:2.8.3 |
| 2.8.2 | rwthika/tensorflow-cc:2.8.2 |
| 2.8.1 | rwthika/tensorflow-cc:2.8.1 |
| 2.8.0 | rwthika/tensorflow-cc:2.8.0 |
| 2.7.4 | rwthika/tensorflow-cc:2.7.4 |
| 2.7.3 | rwthika/tensorflow-cc:2.7.3 |
| 2.7.2 | rwthika/tensorflow-cc:2.7.2 |
| 2.7.1 | rwthika/tensorflow-cc:2.7.1 |
| 2.7.0 | rwthika/tensorflow-cc:2.7.0 |
| 2.6.1 | rwthika/tensorflow-cc:2.6.1 |
| 2.6.0 | rwthika/tensorflow-cc:2.6.0 |
| 2.5.1 | rwthika/tensorflow-cc:2.5.1 |
| 2.5.0 | rwthika/tensorflow-cc:2.5.0 |
| 2.4.3 | rwthika/tensorflow-cc:2.4.3 |
| 2.4.2 | rwthika/tensorflow-cc:2.4.2 |
| 2.4.1 | rwthika/tensorflow-cc:2.4.1 |
| 2.4.0 | rwthika/tensorflow-cc:2.4.0 |
| 2.3.4 | rwthika/tensorflow-cc:2.3.4 |
| 2.3.3 | rwthika/tensorflow-cc:2.3.3 |
| 2.3.2 | rwthika/tensorflow-cc:2.3.2 |
| 2.3.1 | rwthika/tensorflow-cc:2.3.1 |
| 2.3.0 | rwthika/tensorflow-cc:2.3.0 |
| 2.0.4 | rwthika/tensorflow-cc:2.0.4 |
| 2.0.3 | rwthika/tensorflow-cc:2.0.3 |
| 2.0.1 | rwthika/tensorflow-cc:2.0.1 |
| 2.0.0 | rwthika/tensorflow-cc:2.0.0 |
| Version | Step 1 (CPU) | Step 2 (CPU) | Step 4 (CPU) | Step 1 (GPU) | Step 2 (GPU) | Step 4 (GPU) | Notes |
|---|---|---|---|---|---|---|---|
| 2.9.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.9.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.9.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.8.3 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.8.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.8.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.8.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.7.4 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.7.3 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.7.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.7.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.7.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
| 2.6.5 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.6.5; unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.6.4 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.6.4; unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.6.3 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.6.3; unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.6.2 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.6.2; unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.6.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.6.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.5.3 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.5.3; unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.5.2 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.5.2; unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.5.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.5.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.1.0.77-1+cuda11.2 |
| 2.4.4 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.4.4; unable to locate libcudnn7=8.0.4.30-1+cuda11.0 |
| 2.4.3 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.0.4.30-1+cuda11.0 |
| 2.4.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.0.4.30-1+cuda11.0 |
| 2.4.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.0.4.30-1+cuda11.0 |
| 2.4.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=8.0.4.30-1+cuda11.0 |
| 2.3.4 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.3.3 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.3.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.3.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.3.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.2.3 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.2.2 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.2.1 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.2.0 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.4.38-1+cuda10.1 |
| 2.1.4 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.1.3 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.1.2 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.1.1 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.1.0 | :white_check_mark: | :x: | - | :x: | - | - | no module named numpy; unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.0.4 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.0.3 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.0.2 | :white_check_mark: | :x: | - | :x: | - | - | missing image tensorflow/tensorflow:2.0.2; unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.0.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| 2.0.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | - | - | unable to locate libcudnn7=7.6.2.24-1+cuda10.0 |
| TensorFlow | Architecture | Ubuntu | GCC | Bazel | Python | protobuf | CUDA | cuDNN | TensorRT | GPU Compute Capability |
|---|---|---|---|---|---|---|---|---|---|---|
| 2.9.2 | x86_64 | 20.04 | 9.4.0 | 5.3.1 | 3.8.10 | 3.9.2 | 11.2.152 | 8.1.0 | 7.2.2 | 8.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3 |
| 2.9.1 | x86_64 | 20.04 | 9.4.0 | 5.3.0 | 3.8.10 | 3.9.2 | 11.2.152 | 8.1.0 | 7.2.2 | 8.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3 |
| 2.9.0 | x86_64 | 20.04 | 9.4.0 | 5.3.0 | 3.8.10 | 3.9.2 | 11.2.152 | 8.1.0 | 7.2.2 | 8.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3 |
| 2.8.3 | x86_64 | 20.04 | 9.4.0 | 4.2.1 | 3.8.10 | 3.9.2 | 11.2.152 | 8.1.0 | 7.2.2 | 8.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3 |
| 2.8.2 | x86_64 | 20.04 | 9.4.0 | 4.2.1 | 3.8.10 | 3.9.2 | 11.2.152 | 8.1.0 | 7.2.2 | 8.6, 8.0, 7.5, 7.2, 7.0,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2 | - | - | - | - |
| 2.6.2 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.6.1 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.6.0 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.5.3 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.5.2 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.5.1 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.5.0 | x86_64 | 18.04 | 7.5.0 | 3.7.2 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.4.4 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.4.3 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.4.2 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.4.1 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.4.0 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.3.4 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.3.3 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.3.2 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.3.1 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.3.0 | x86_64 | 18.04 | 7.5.0 | 3.1.0 | 3.6.9 | 3.9.2 | - | - | - | - |
| 2.2.3 | x86_64 | 18.04 | 7.5.0 | 2.0.0 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.2.2 | x86_64 | 18.04 | 7.5.0 | 2.0.0 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.2.1 | x86_64 | 18.04 | 7.5.0 | 2.0.0 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.2.0 | x86_64 | 18.04 | 7.5.0 | 2.0.0 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.1.4 | x86_64 | 18.04 | 7.5.0 | 0.29.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.1.3 | x86_64 | 18.04 | 7.5.0 | 0.29.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.1.2 | x86_64 | 18.04 | 7.5.0 | 0.29.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.1.1 | x86_64 | 18.04 | 7.5.0 | 0.29.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.1.0 | x86_64 | 18.04 | 7.5.0 | 0.29.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.0.4 | x86_64 | 18.04 | 7.5.0 | 0.26.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.0.3 | x86_64 | 18.04 | 7.5.0 | 0.26.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.0.2 | x86_64 | 18.04 | 7.5.0 | 0.26.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.0.1 | x86_64 | 18.04 | 7.5.0 | 0.26.1 | 2.7.17 | 3.8.0 | - | - | - | - |
| 2.0.0 | x86_64 | 18.04 | 7.5.0 | 0.26.1 | 2.7.17 | 3.8.0 | - | - | - | - |
This repository is not endorsed by or otherwise affiliated with TensorFlow or Google. TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.
Content type
Image
Digest
sha256:fcbab442b…
Size
797.6 MB
Last updated
over 3 years ago
docker pull rwthika/tensorflow-cc