message: Use Python3.7 and pip3.7 and install dependencies. Run the horovod code and tests in the temp directory.
diff: set -e
  set -x
  -# TODO(pkanwar): upgrade to 3.7.
  -PIP_CMD="pip3.5"
  -
  # Source the external common scripts.
  source tensorflow/tools/ci_build/release/common.sh
  +# Exit src directory to avoid Python import issues.
  +# We do not need TensorFlow source files.
  +mkdir /tmp/horovod_test
  +cd /tmp/horovod_test
  +
  +
  +# Update the latest Python dependency packages via pip3.7
  +install_ubuntu_16_pip_deps pip3.7
  +
  # Install latest bazel
  install_bazelisk
  which bazel
  @@ -30,9 +36,9 @@ which bazel
  sudo apt-get install realpath
  # Install tf-nightly and verify version.
  -python3.5 -m "${PIP_CMD}" install --user tf-nightly
  +pip3.7 install --user --upgrade tf-nightly
  -python3.5 -c "import tensorflow as tf; print(tf.__version__)"
  +python3.7 -c "import tensorflow as tf; print(tf.__version__)"
  # Download and install open-mpi.
  wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.4.tar.gz
  @@ -54,17 +60,17 @@ sudo ldconfig
  # Install Horovod.
  cd ..
  HOROVOD_WITH_TENSORFLOW=1
  -"${PIP_CMD}" install horovod[tensorflow]
  +pip3.7 install horovod[tensorflow]
  # Install tests.
  git clone https://github.com/DEKHTIARJonathan/TF_HVD_Stability_Test.git
  # Install pytest.
  -"${PIP_CMD}" install -U pytest
  +pip3.7 install -U pytest
  # Install requirements.
  cd TF_HVD_Stability_Test
  -"${PIP_CMD}" install -r requirements.txt
  +pip3.7 install -r requirements.txt
  # Run the tests.
  -python3.5 -m pytest
  +python3.7 -m pytest
  