diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu index 10c8c62d970b..abd7c0d04dab 100644 --- a/docker/Dockerfile.ci_cpu +++ b/docker/Dockerfile.ci_cpu @@ -63,3 +63,11 @@ RUN bash /install/ubuntu_install_antlr.sh # Chisel deps for TSIM COPY install/ubuntu_install_chisel.sh /install/ubuntu_install_chisel.sh RUN bash /install/ubuntu_install_chisel.sh + +# TFLite deps +COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh +RUN bash /install/ubuntu_install_tflite.sh + +# TensorFlow deps +COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh +RUN bash /install/ubuntu_install_tensorflow.sh diff --git a/docker/install/ubuntu_install_tflite.sh b/docker/install/ubuntu_install_tflite.sh index 49b0f2badf82..f7ed4841b328 100755 --- a/docker/install/ubuntu_install_tflite.sh +++ b/docker/install/ubuntu_install_tflite.sh @@ -6,9 +6,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -26,12 +26,18 @@ cd flatbuffers cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release make install -j8 cd .. -rm -rf flatbuffers # Install flatbuffers python packages. pip3 install flatbuffers pip2 install flatbuffers +# Build the TFLite static library, necessary for building with TFLite ON. +# The library is built at: +# tensorflow/tensorflow/lite/tools/make/gen/*/lib/libtensorflow-lite.a. +git clone https://github.com/tensorflow/tensorflow --branch=r2.1 +./tensorflow/tensorflow/lite/tools/make/download_dependencies.sh +./tensorflow/tensorflow/lite/tools/make/build_lib.sh + # Setup tflite from schema mkdir tflite cd tflite