Skip to content

Commit 7e2412c

Browse files
vam-googletf-text-github-robot
authored andcommitted
fix nightly package installation for tf.text ci jobs
PiperOrigin-RevId: 641960415
1 parent 0fa2435 commit 7e2412c

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

oss_scripts/configure.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ elif (which python) | grep -q "python"; then
6868
installed_python="python"
6969
fi
7070

71+
HERMETIC_PYTHON_VERSION=$($installed_python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
72+
export HERMETIC_PYTHON_VERSION
73+
74+
echo "TF_VERSION=$TF_VERSION"
75+
REQUIREMENTS_EXTRA_FLAGS="--upgrade"
76+
if [[ "$TF_VERSION" == *"rc"* ]]; then
77+
REQUIREMENTS_EXTRA_FLAGS="$REQUIREMENTS_EXTRA_FLAGS --pre"
78+
fi
79+
80+
bazel run //oss_scripts/pip_package:requirements.update -- $REQUIREMENTS_EXTRA_FLAGS
81+
7182
TF_ABIFLAG=$(bazel run //oss_scripts/pip_package:tensorflow_build_info -- abi)
7283

7384
HEADER_DIR=${TF_CFLAGS:2}

oss_scripts/prepare_tf_dep.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ if [[ "${osname}" == "darwin" ]]; then
1313
ext='""'
1414
fi
1515

16-
HERMETIC_PYTHON_VERSION=$($installed_python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
17-
export HERMETIC_PYTHON_VERSION
18-
19-
20-
echo "TF_VERSION=$TF_VERSION"
21-
REQUIREMENTS_EXTRA_FLAGS="--upgrade"
22-
if [[ "$TF_VERSION" == *"rc"* ]]; then
23-
REQUIREMENTS_EXTRA_FLAGS="$REQUIREMENTS_EXTRA_FLAGS --pre"
24-
fi
25-
2616
bazel run //oss_scripts/pip_package:requirements.update -- $REQUIREMENTS_EXTRA_FLAGS
2717

2818
# Update setup.nightly.py with current tf version.

0 commit comments

Comments
 (0)