diff --git a/Dockerfile b/Dockerfile index 711dc4ba30a70f8985df23d861894921d12b1982..9ed226f082ee474fdd384f897e9e1d6e4d9354b2 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/ \