From 4073a56dc29e744c617351011a70ba5d0fc86692 Mon Sep 17 00:00:00 2001 From: Siva Date: Thu, 30 Jan 2025 16:19:31 +0530 Subject: [PATCH] [DOCKER] Tensorflow upgrade to 2.18.0 upgrade TF to latest version and fixup tflite build issue accordingly. --- docker/install/ubuntu_install_tensorflow.sh | 4 ++-- docker/install/ubuntu_install_tflite.sh | 9 +++++++-- docker/install/ubuntu_install_wasmtime.sh | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docker/install/ubuntu_install_tensorflow.sh b/docker/install/ubuntu_install_tensorflow.sh index 2225b7aef3b8..45dd2f95ddd4 100755 --- a/docker/install/ubuntu_install_tensorflow.sh +++ b/docker/install/ubuntu_install_tensorflow.sh @@ -21,5 +21,5 @@ set -u set -o pipefail pip3 install \ - keras==2.9 \ - tensorflow==2.9.1 + keras==3.5.0 \ + tensorflow==2.18.0 diff --git a/docker/install/ubuntu_install_tflite.sh b/docker/install/ubuntu_install_tflite.sh index 36e6dfc42794..ada5c7d2c274 100755 --- a/docker/install/ubuntu_install_tflite.sh +++ b/docker/install/ubuntu_install_tflite.sh @@ -26,7 +26,7 @@ set -o pipefail TENSORFLOW_VERSION=$(python3 -c "import tensorflow; print(tensorflow.__version__)" 2> /dev/null) # Download, build and install flatbuffers -git clone --branch=v1.12.0 --depth=1 --recursive https://github.com/google/flatbuffers.git +git clone --branch=v25.1.24 --depth=1 --recursive https://github.com/google/flatbuffers.git cd flatbuffers cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wno-class-memaccess" make install -j8 @@ -52,7 +52,12 @@ cd - # Setup tflite from schema mkdir tflite -cp tensorflow/tensorflow/lite/schema/schema.fbs tflite +if [ -f tensorflow/tensorflow/compiler/mlir/lite/schema/schema.fbs ] ; then + cp tensorflow/tensorflow/compiler/mlir/lite/schema/schema.fbs tflite +else + cp tensorflow/tensorflow/lite/schema/schema.fbs tflite +fi + cd tflite flatc --python schema.fbs diff --git a/docker/install/ubuntu_install_wasmtime.sh b/docker/install/ubuntu_install_wasmtime.sh index b93527135c97..72b7664af44a 100755 --- a/docker/install/ubuntu_install_wasmtime.sh +++ b/docker/install/ubuntu_install_wasmtime.sh @@ -23,7 +23,7 @@ apt-install-and-clear -y --no-install-recommends libc6-dev-i386 export WASMTIME_HOME=/opt/wasmtime curl https://wasmtime.dev/install.sh -sSf | bash export PATH="${WASMTIME_HOME}/bin:${PATH}" -rustup target add wasm32-wasi +rustup target add wasm32-wasip1 # make rust usable by all users after install during container build chmod -R a+rw /opt/rust