Skip to content

Commit

Permalink
[Docker] Update tensorflow/tflite/xgboost versions (apache#8306)
Browse files Browse the repository at this point in the history
* [Docker] Updated tensorflow/tflite version to 2.4.2

Tensorflow update required following update to cuda 11.0.  Based on
https://www.tensorflow.org/install/source#gpu, the 2.4 branch of
tensorflow should be used with cuda 11.0.

- Removed pinned version of keras/h5py, no longer needed.

  tensorflow/tensorflow#44467 (comment)

- Updated tflite version to 2.4.2.  Also, tflite install script now
  reads the installed version of tensorflow, to keep the version
  matched in the future.

* [Docker] Corrected version pinning of xgboost

Previously, due to missing quotes, installed most recent version of
xgboost, piping the results to a file named '=1.1.0'.  Now, installs
xgboost at least at version 1.1.0.

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
  • Loading branch information
2 people authored and ylc committed Sep 29, 2021
1 parent 252c5ce commit 88f84ec
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ conda/pkg
.envrc
*.nix

# Docker files
.sudo_as_admin_successful

# Downloaded models/datasets
.tvm_test_data
.dgl
Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ set -u
set -o pipefail

apt-get update && apt-get install -y redis-server
pip3 install xgboost>=1.1.0 psutil
pip3 install "xgboost>=1.1.0" psutil
5 changes: 1 addition & 4 deletions docker/install/ubuntu_install_tensorflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ set -e
set -u
set -o pipefail

# h5py is pinned to minor than 3 due to issues with
# tensorflow:
# https://github.com/tensorflow/tensorflow/issues/44467
pip3 install tensorflow==2.3.1 keras==2.4.3 "h5py<3.0"
pip3 install tensorflow==2.4.2
10 changes: 7 additions & 3 deletions docker/install/ubuntu_install_tflite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ set -e
set -u
set -o pipefail

# The tflite version should have matched versions to the tensorflow
# version installed from pip in ubuntu_install_tensorflow.sh
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
cd flatbuffers
Expand All @@ -33,22 +37,22 @@ pip3 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.3
git clone https://github.com/tensorflow/tensorflow --branch=v${TENSORFLOW_VERSION}
./tensorflow/tensorflow/lite/tools/make/download_dependencies.sh
./tensorflow/tensorflow/lite/tools/make/build_lib.sh

# Setup tflite from schema
mkdir tflite
cp tensorflow/tensorflow/lite/schema/schema.fbs tflite
cd tflite
wget -q https://raw.githubusercontent.com/tensorflow/tensorflow/r2.3/tensorflow/lite/schema/schema.fbs
flatc --python schema.fbs

cat <<EOM >setup.py
import setuptools
setuptools.setup(
name="tflite",
version="2.3.1",
version="${TENSORFLOW_VERSION}",
author="google",
author_email="google@google.com",
description="TFLite",
Expand Down

0 comments on commit 88f84ec

Please sign in to comment.