diff --git a/tensorflow/tools/ci_build/Dockerfile.cpu-py38 b/tensorflow/tools/ci_build/Dockerfile.cpu-py38 index 3d401f56647b64..f576846351c9f2 100644 --- a/tensorflow/tools/ci_build/Dockerfile.cpu-py38 +++ b/tensorflow/tools/ci_build/Dockerfile.cpu-py38 @@ -1,13 +1,16 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 -LABEL maintainer="Gauri Deshpande " +LABEL maintainer="Ravi Gupta " # Copy and run the install scripts. +RUN apt-get update +RUN apt-get upgrade -y +RUN apt-get install cmake -y + COPY install/*.sh /install/ -RUN /install/install_bootstrap_deb_packages.sh -RUN add-apt-repository -y ppa:openjdk-r/ppa && \ - add-apt-repository -y ppa:george-edison55/cmake-3.x -RUN /install/install_deb_packages.sh +RUN bash -x /install/install_bootstrap_deb_packages.sh +RUN add-apt-repository -y ppa:openjdk-r/ppa +RUN bash -x /install/install_deb_packages.sh # Install gcc 7 RUN add-apt-repository ppa:ubuntu-toolchain-r/test @@ -16,15 +19,21 @@ RUN apt -y install gcc-7 g++-7 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 \ --slave /usr/bin/g++ g++ /usr/bin/g++-7 -# The following line installs the Python 3.8 cross-compilation toolchain. -RUN /install/install_pi_python3x_toolchain.sh "3.8" +# Install Python 3.8 +# libffi-dev is needed for ctypes module of python3.8 +RUN apt install libffi-dev +# libsqlite3-dev is needed for module named '_sqlite3' +RUN apt install libsqlite3-dev +RUN chmod 777 /install/install_python38.sh +RUN /install/install_python38.sh RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 0 RUN python3 -V +RUN /install/install_pip_packages_by_version.sh pip3 -RUN /install/install_bazel.sh -RUN /install/install_proto3.sh -RUN /install/install_buildifier.sh -RUN /install/install_auditwheel.sh -RUN /install/install_golang.sh +RUN bash -x /install/install_bazel.sh +RUN bash -x /install/install_proto3.sh +RUN bash -x /install/install_buildifier.sh +RUN bash -x /install/install_auditwheel.sh +RUN bash -x /install/install_golang.sh # Set up the master bazelrc configuration file. COPY install/.bazelrc /etc/bazel.bazelrc diff --git a/tensorflow/tools/ci_build/install/install_bazel.sh b/tensorflow/tools/ci_build/install/install_bazel.sh index 063e1f97bace86..593838ec65e7ca 100755 --- a/tensorflow/tools/ci_build/install/install_bazel.sh +++ b/tensorflow/tools/ci_build/install/install_bazel.sh @@ -15,7 +15,7 @@ # ============================================================================== # Select bazel version. -BAZEL_VERSION="3.7.2" +BAZEL_VERSION="5.1.1" set +e local_bazel_ver=$(bazel version 2>&1 | grep -i label | awk '{print $3}') diff --git a/tensorflow/tools/ci_build/install/install_deb_packages.sh b/tensorflow/tools/ci_build/install/install_deb_packages.sh index 7eaadb52c5e3fa..d83d37a1491579 100755 --- a/tensorflow/tools/ci_build/install/install_deb_packages.sh +++ b/tensorflow/tools/ci_build/install/install_deb_packages.sh @@ -28,7 +28,6 @@ if [[ "$1" != "" ]] && [[ "$1" != "--without_cmake" ]]; then fi # Install dependencies from ubuntu deb repository. -apt-key adv --keyserver keyserver.ubuntu.com --recv 084ECFC5828AB726 apt-get update if [[ "$ubuntu_version" == "14" ]]; then diff --git a/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh b/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh index 1847a025722997..2c54fac6776f7a 100755 --- a/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh +++ b/tensorflow/tools/ci_build/install/install_pip_packages_by_version.sh @@ -43,6 +43,7 @@ PACKAGES=( "protobuf" "scipy" "scikit-learn" + "packaging" "pandas" "psutil" "py-cpuinfo" @@ -57,7 +58,7 @@ PACKAGES=( "keras_preprocessing" "h5py" "tf-estimator-nightly" - "tb-nightly" + "tb-nightly>=2.9.0a20220210" "argparse" "dm-tree" "dill" diff --git a/tensorflow/tools/ci_build/install/install_python38.sh b/tensorflow/tools/ci_build/install/install_python38.sh new file mode 100755 index 00000000000000..c3c8a8f7aa311e --- /dev/null +++ b/tensorflow/tools/ci_build/install/install_python38.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Copyright 2019 The TensorFlow Authors. All Rights Reserved. +# +# Licensed 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 KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== + +cd /usr/src +wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz +tar xzf Python-3.8.10.tgz +cd Python-3.8.10 +./configure --enable-optimizations --with-ensurepip=install --prefix=/usr/ +make altinstall +rm /usr/src/Python-3.8.10.tgz +rm -rf /usr/src/Python-3.8.10 +