From ae5f7615aa76e1b5dd62f77a23d6073da647de1f Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@inrae.fr>
Date: Fri, 19 May 2023 16:29:51 +0200
Subject: [PATCH] COMP: build tf graph transform

---
 Dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 711dc4b..9ed226f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,7 +51,7 @@ RUN wget -qO /opt/otbtf/bin/bazelisk https://github.com/bazelbuild/bazelisk/rele
  && chmod +x /opt/otbtf/bin/bazelisk \
  && ln -s /opt/otbtf/bin/bazelisk /opt/otbtf/bin/bazel
 
-ARG BZL_TARGETS="//tensorflow:libtensorflow_cc.so //tensorflow/tools/pip_package:build_pip_package"
+ARG BZL_TARGETS="//tensorflow:libtensorflow_cc.so //tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/graph_transforms:transform_graph"
 
 # "--config=opt" will enable 'march=native'
 # (otherwise read comments about CPU compatibility and edit CC_OPT_FLAGS in
@@ -82,6 +82,7 @@ RUN cd tensorflow \
  && pip3 install --no-cache-dir --prefix=/opt/otbtf /tmp/tensorflow_pkg/tensorflow*.whl \
  && ln -s /opt/otbtf/local/lib/python3.*/* /opt/otbtf/lib/python3 \
  && ln -s /opt/otbtf/local/bin/* /opt/otbtf/bin \
+ && cp -r bazel-bin/tensorflow/tools/graph_transforms /opt/otbtf/bin/graph_transforms \
  && ln -s $(find /opt/otbtf -type d -wholename "*/dist-packages/tensorflow/include") /opt/otbtf/include/tf \
  # The only missing header in the wheel
  && cp tensorflow/cc/saved_model/tag_constants.h /opt/otbtf/include/tf/tensorflow/cc/saved_model/ \
-- 
GitLab