Skip to content

Commit

Permalink
Do not run ./configure as part of ubuntu release build scripts, use b…
Browse files Browse the repository at this point in the history
…azel flags instead.

PiperOrigin-RevId: 363976096
Change-Id: Iba5a30903c1d9593b8f8554a0c25cff2ecbce2a1
  • Loading branch information
chsigg authored and tensorflower-gardener committed Mar 19, 2021
1 parent 57a426c commit 9c24be7
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 116 deletions.
4 changes: 1 addition & 3 deletions tensorflow/tools/ci_build/builds/libtensorflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ function build_libtensorflow_tarball() {
else
BAZEL_OPTS="${BAZEL_OPTS} --config=release_cpu_linux"
fi
bazel clean --expunge
export PYTHON_BIN_PATH=$(which python3.8)
yes "" | "$PYTHON_BIN_PATH" configure.py
BAZEL_OPTS="${BAZEL_OPTS} --repo_env=PYTHON_BIN_PATH="$(which python3.8)""

# Remove this test call when
# https://github.com/bazelbuild/bazel/issues/2352
Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py36.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ install_ubuntu_16_python_pip_deps python3.6

install_bazelisk

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.6)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_cpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.6)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag

Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py37.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ install_ubuntu_16_python_pip_deps python3.7

install_bazelisk

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.7)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_cpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.7)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag

Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py38.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ install_ubuntu_16_python_pip_deps python3.8

install_bazelisk

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.8)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_cpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.8)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag

Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/cpu_py39.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ install_ubuntu_16_python_pip_deps python3.9

install_bazelisk

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.9)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_cpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_cpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.9)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --cpu --nightly_flag

Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py36.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ install_ubuntu_16_python_pip_deps python3.6

install_bazelisk

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.6)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_gpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.6)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag
./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag
Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py37.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ install_ubuntu_16_python_pip_deps python3.7

install_bazelisk

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.7)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_gpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.7)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag
./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag
Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py38.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ pip3.7 install --upgrade auditwheel --user

update_bazel_linux

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.8)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_gpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.8)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag
./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag
Expand Down
12 changes: 5 additions & 7 deletions tensorflow/tools/ci_build/nightly_release/ubuntu/gpu_py39.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ pip3.7 install --upgrade auditwheel --user

update_bazel_linux

python2.7 tensorflow/tools/ci_build/update_version.py --nightly

# Run configure.
export CC_OPT_FLAGS='-mavx'
export PYTHON_BIN_PATH=$(which python3.9)
yes "" | "$PYTHON_BIN_PATH" configure.py
python tensorflow/tools/ci_build/update_version.py --nightly

# Build the pip package
bazel build --config=release_gpu_linux tensorflow/tools/pip_package:build_pip_package
bazel build \
--config=release_gpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.9)" \
tensorflow/tools/pip_package:build_pip_package

./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --nightly_flag
./bazel-bin/tensorflow/tools/pip_package/build_pip_package pip_pkg --gpu --nightly_flag
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/cpu_py36_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="CPU"
export TF_PYTHON_VERSION='python3.6'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_BUILD_FLAGS="--config=release_cpu_linux"
export TF_BUILD_FLAGS="--config=release_cpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going --test_env=TF2_BEHAVIOR=1"
export TF_TEST_TARGETS="${DEFAULT_BAZEL_TARGETS} -//tensorflow/lite/... "
export TF_PIP_TESTS="test_pip_virtualenv_non_clean test_pip_virtualenv_clean"
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/cpu_py37_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="CPU"
export TF_PYTHON_VERSION='python3.7'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_BUILD_FLAGS="--config=release_cpu_linux"
export TF_BUILD_FLAGS="--config=release_cpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going --test_env=TF2_BEHAVIOR=1"
export TF_TEST_TARGETS="${DEFAULT_BAZEL_TARGETS} -//tensorflow/lite/... "
export TF_PIP_TESTS="test_pip_virtualenv_non_clean test_pip_virtualenv_clean"
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/cpu_py38_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="CPU"
export TF_PYTHON_VERSION='python3.8'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_BUILD_FLAGS="--config=release_cpu_linux"
export TF_BUILD_FLAGS="--config=release_cpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going --test_env=TF2_BEHAVIOR=1"
export TF_TEST_TARGETS="${DEFAULT_BAZEL_TARGETS} -//tensorflow/lite/... "
export TF_PIP_TESTS="test_pip_virtualenv_non_clean test_pip_virtualenv_clean"
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/cpu_py39_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="CPU"
export TF_PYTHON_VERSION='python3.9'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_BUILD_FLAGS="--config=release_cpu_linux"
export TF_BUILD_FLAGS="--config=release_cpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going --test_env=TF2_BEHAVIOR=1"
export TF_TEST_TARGETS="${DEFAULT_BAZEL_TARGETS} -//tensorflow/lite/... "
export TF_PIP_TESTS="test_pip_virtualenv_non_clean test_pip_virtualenv_clean"
Expand Down
21 changes: 4 additions & 17 deletions tensorflow/tools/ci_build/rel/ubuntu/gpu_pip_on_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,14 @@ install_ubuntu_16_python_pip_deps python3.6
# Update Bazel to the desired version
install_bazelisk

# Run configure.
export TF_NEED_GCP=1
export TF_NEED_HDFS=1
export TF_NEED_S3=1
export TF_NEED_CUDA=1
export TF_CUDA_VERSION=11.2
export TF_CUDNN_VERSION=8.1
export TF_NEED_TENSORRT=1
export TENSORRT_INSTALL_PATH=/usr/local/tensorrt
export CC_OPT_FLAGS='-mavx -march=native'
export PYTHON_BIN_PATH=$(which python3.6)
export LD_LIBRARY_PATH="/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:$TENSORRT_INSTALL_PATH/lib"
export TF_CUDA_COMPUTE_CAPABILITIES=sm_35,sm_50,sm_60,sm_70,sm_75,compute_80

yes "" | "$PYTHON_BIN_PATH" configure.py
export LD_LIBRARY_PATH="/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/tensorrt/lib"

########################
## Build GPU pip package
########################
bazel build --config=opt \
--crosstool_top=//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda11.2:toolchain \
bazel build \
--config=release_gpu_linux \
--repo_env=PYTHON_BIN_PATH="$(which python3.6)" \
tensorflow/tools/pip_package:build_pip_package

# Set TF nightly flag so we get the proper version of estimator
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/gpu_py36_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="GPU"
export TF_PYTHON_VERSION='python3.6'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_TEST_FILTER_TAGS='gpu,requires-gpu,-no_gpu,-no_oss,-oss_serial,-no_oss_py36,-no_cuda11'
export TF_BUILD_FLAGS="--config=release_gpu_linux "
export TF_BUILD_FLAGS="--config=release_gpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--test_tag_filters=${TF_TEST_FILTER_TAGS} --build_tag_filters=${TF_TEST_FILTER_TAGS} \
--distinct_host_configuration=false \
--action_env=TF_CUDA_VERSION=11.2 --action_env=TF_CUDNN_VERSION=8.1 --test_env=TF2_BEHAVIOR=1 \
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/gpu_py37_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="GPU"
export TF_PYTHON_VERSION='python3.7'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_TEST_FILTER_TAGS='gpu,requires-gpu,-no_gpu,-no_oss,-oss_serial,-no_oss_py37,-no_cuda11'
export TF_BUILD_FLAGS="--config=release_gpu_linux "
export TF_BUILD_FLAGS="--config=release_gpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--test_tag_filters=${TF_TEST_FILTER_TAGS} --build_tag_filters=${TF_TEST_FILTER_TAGS} \
--distinct_host_configuration=false \
--action_env=TF_CUDA_VERSION=11.2 --action_env=TF_CUDNN_VERSION=8.1 --test_env=TF2_BEHAVIOR=1 \
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/gpu_py38_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="GPU"
export TF_PYTHON_VERSION='python3.8'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_TEST_FILTER_TAGS='gpu,requires-gpu,-no_gpu,-no_oss,-oss_serial,-no_oss_py38,-no_cuda11'
export TF_BUILD_FLAGS="--config=release_gpu_linux "
export TF_BUILD_FLAGS="--config=release_gpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--test_tag_filters=${TF_TEST_FILTER_TAGS} --build_tag_filters=${TF_TEST_FILTER_TAGS} \
--distinct_host_configuration=false \
--action_env=TF_CUDA_VERSION=11.2 --action_env=TF_CUDNN_VERSION=8.1 --test_env=TF2_BEHAVIOR=1 \
Expand Down
6 changes: 1 addition & 5 deletions tensorflow/tools/ci_build/rel/ubuntu/gpu_py39_pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ export OS_TYPE="UBUNTU"
export CONTAINER_TYPE="GPU"
export TF_PYTHON_VERSION='python3.9'

# Run configure.
export PYTHON_BIN_PATH=$(which ${TF_PYTHON_VERSION})
yes "" | "$PYTHON_BIN_PATH" configure.py

# Get the default test targets for bazel.
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh

# Export optional variables for running pip.sh
export TF_TEST_FILTER_TAGS='gpu,requires-gpu,-no_gpu,-no_oss,-oss_serial,-no_oss_py39,-no_cuda11'
export TF_BUILD_FLAGS="--config=release_gpu_linux "
export TF_BUILD_FLAGS="--config=release_gpu_linux --repo_env=PYTHON_BIN_PATH="$(which ${TF_PYTHON_VERSION})""
export TF_TEST_FLAGS="--test_tag_filters=${TF_TEST_FILTER_TAGS} --build_tag_filters=${TF_TEST_FILTER_TAGS} \
--distinct_host_configuration=false \
--action_env=TF_CUDA_VERSION=11.2 --action_env=TF_CUDNN_VERSION=8.1 --test_env=TF2_BEHAVIOR=1 \
Expand Down

0 comments on commit 9c24be7

Please sign in to comment.