Sign inSign up

rwthika/tensorflow-cc

By rwthika

•Updated about 3 years ago

TensorFlow C++ API

Image
1

10K+

rwthika/tensorflow-cc repository overview

Extract from the official GitHub repository⁠

⁠libtensorflow_cc

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:

  1. We provide the pre-built libtensorflow_cc.so including accompanying headers as a one-command-install deb-package. The build supports x86_64 machines running Ubuntu. See Installation⁠.
  2. We provide a pre-built Docker image based on the official TensorFlow Docker image. Our Docker image has both TensorFlow Python and TensorFlow C++ installed. See Docker Images⁠.

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⁠.


⁠Demo

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

⁠Docker Images

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 VersionCPU/GPUImage:Tag
2.9.2GPUrwthika/tensorflow-cc:latest-gpu
2.9.2CPUrwthika/tensorflow-cc:latest
All TensorFlow Versions (GPU)
TensorFlow VersionImage:Tag
latestrwthika/tensorflow-cc:latest-gpu
2.9.2rwthika/tensorflow-cc:2.9.2-gpu
2.9.1rwthika/tensorflow-cc:2.9.1-gpu
2.9.0rwthika/tensorflow-cc:2.9.0-gpu
2.8.3rwthika/tensorflow-cc:2.8.3-gpu
2.8.2rwthika/tensorflow-cc:2.8.2-gpu
2.8.1rwthika/tensorflow-cc:2.8.1-gpu
2.8.0rwthika/tensorflow-cc:2.8.0-gpu
2.7.4rwthika/tensorflow-cc:2.7.4-gpu
2.7.3rwthika/tensorflow-cc:2.7.3-gpu
2.7.2rwthika/tensorflow-cc:2.7.2-gpu
2.7.1rwthika/tensorflow-cc:2.7.1-gpu
2.7.0rwthika/tensorflow-cc:2.7.0-gpu
All TensorFlow Versions (CPU)
TensorFlow VersionImage:Tag
latestrwthika/tensorflow-cc:latest
2.9.2rwthika/tensorflow-cc:2.9.2
2.9.1rwthika/tensorflow-cc:2.9.1
2.9.0rwthika/tensorflow-cc:2.9.0
2.8.3rwthika/tensorflow-cc:2.8.3
2.8.2rwthika/tensorflow-cc:2.8.2
2.8.1rwthika/tensorflow-cc:2.8.1
2.8.0rwthika/tensorflow-cc:2.8.0
2.7.4rwthika/tensorflow-cc:2.7.4
2.7.3rwthika/tensorflow-cc:2.7.3
2.7.2rwthika/tensorflow-cc:2.7.2
2.7.1rwthika/tensorflow-cc:2.7.1
2.7.0rwthika/tensorflow-cc:2.7.0
2.6.1rwthika/tensorflow-cc:2.6.1
2.6.0rwthika/tensorflow-cc:2.6.0
2.5.1rwthika/tensorflow-cc:2.5.1
2.5.0rwthika/tensorflow-cc:2.5.0
2.4.3rwthika/tensorflow-cc:2.4.3
2.4.2rwthika/tensorflow-cc:2.4.2
2.4.1rwthika/tensorflow-cc:2.4.1
2.4.0rwthika/tensorflow-cc:2.4.0
2.3.4rwthika/tensorflow-cc:2.3.4
2.3.3rwthika/tensorflow-cc:2.3.3
2.3.2rwthika/tensorflow-cc:2.3.2
2.3.1rwthika/tensorflow-cc:2.3.1
2.3.0rwthika/tensorflow-cc:2.3.0
2.0.4rwthika/tensorflow-cc:2.0.4
2.0.3rwthika/tensorflow-cc:2.0.3
2.0.1rwthika/tensorflow-cc:2.0.1
2.0.0rwthika/tensorflow-cc:2.0.0

⁠Supported TensorFlow Versions

Show Table
VersionStep 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
⁠Version Matrix
Show Table
TensorFlowArchitectureUbuntuGCCBazelPythonprotobufCUDAcuDNNTensorRTGPU Compute Capability
2.9.2x86_6420.049.4.05.3.13.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.9.1x86_6420.049.4.05.3.03.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.9.0x86_6420.049.4.05.3.03.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.8.3x86_6420.049.4.04.2.13.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.8.2x86_6420.049.4.04.2.13.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.8.1x86_6420.049.4.04.2.13.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.8.0x86_6420.049.4.04.2.13.8.103.9.211.2.1528.1.07.2.28.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.7.4x86_6420.049.4.03.7.23.8.103.9.211.2.1528.1.08.0.08.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.7.3x86_6420.049.4.03.7.23.8.103.9.211.2.1528.1.08.0.08.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.7.2x86_6420.049.4.03.7.23.8.103.9.211.2.1528.1.08.0.08.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.7.1x86_6420.049.4.03.7.23.8.103.9.211.2.1528.1.08.0.08.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.7.0x86_6420.049.4.03.7.23.8.103.9.211.2.1528.1.08.0.08.6, 8.0, 7.5, 7.2, 7.0, 6.1, 6.0, 5.3
2.6.5x86_6418.047.5.03.7.23.6.93.9.2----
2.6.4x86_6418.047.5.03.7.23.6.93.9.2----
2.6.3x86_6418.047.5.03.7.23.6.93.9.2----
2.6.2x86_6418.047.5.03.7.23.6.93.9.2----
2.6.1x86_6418.047.5.03.7.23.6.93.9.2----
2.6.0x86_6418.047.5.03.7.23.6.93.9.2----
2.5.3x86_6418.047.5.03.7.23.6.93.9.2----
2.5.2x86_6418.047.5.03.7.23.6.93.9.2----
2.5.1x86_6418.047.5.03.7.23.6.93.9.2----
2.5.0x86_6418.047.5.03.7.23.6.93.9.2----
2.4.4x86_6418.047.5.03.1.03.6.93.9.2----
2.4.3x86_6418.047.5.03.1.03.6.93.9.2----
2.4.2x86_6418.047.5.03.1.03.6.93.9.2----
2.4.1x86_6418.047.5.03.1.03.6.93.9.2----
2.4.0x86_6418.047.5.03.1.03.6.93.9.2----
2.3.4x86_6418.047.5.03.1.03.6.93.9.2----
2.3.3x86_6418.047.5.03.1.03.6.93.9.2----
2.3.2x86_6418.047.5.03.1.03.6.93.9.2----
2.3.1x86_6418.047.5.03.1.03.6.93.9.2----
2.3.0x86_6418.047.5.03.1.03.6.93.9.2----
2.2.3x86_6418.047.5.02.0.02.7.173.8.0----
2.2.2x86_6418.047.5.02.0.02.7.173.8.0----
2.2.1x86_6418.047.5.02.0.02.7.173.8.0----
2.2.0x86_6418.047.5.02.0.02.7.173.8.0----
2.1.4x86_6418.047.5.00.29.12.7.173.8.0----
2.1.3x86_6418.047.5.00.29.12.7.173.8.0----
2.1.2x86_6418.047.5.00.29.12.7.173.8.0----
2.1.1x86_6418.047.5.00.29.12.7.173.8.0----
2.1.0x86_6418.047.5.00.29.12.7.173.8.0----
2.0.4x86_6418.047.5.00.26.12.7.173.8.0----
2.0.3x86_6418.047.5.00.26.12.7.173.8.0----
2.0.2x86_6418.047.5.00.26.12.7.173.8.0----
2.0.1x86_6418.047.5.00.26.12.7.173.8.0----
2.0.0x86_6418.047.5.00.26.12.7.173.8.0----

⁠Notice

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.

Tag summary

Content type

Image

Digest

sha256:fcbab442b…

Size

797.6 MB

Last updated

over 3 years ago

docker pull rwthika/tensorflow-cc