Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions kokoro/github/ubuntu/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,35 @@
set -e
set -x

cd "${KOKORO_ARTIFACTS_DIR}/github/gnn/"
echo "Build disabled due to impossibility of using tf-nightly for testing."
exit 0

PYENV_ROOT="/home/kbuilder/.pyenv"
PYTHON_VERSION=${PYTHON_VERSION:-"3.11"}

echo "Installing pyenv.."
git clone https://github.com/pyenv/pyenv.git "$PYENV_ROOT"
export PATH="/home/kbuilder/.local/bin:$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
echo "Python setup..."
pyenv install -s "$PYTHON_VERSION"
pyenv global "$PYTHON_VERSION"

cd "${KOKORO_ARTIFACTS_DIR}/github/gnn/"

PYTHON_BINARY="/usr/bin/python3.9"
PIP_TEST_PREFIX=bazel_pip

"${PYTHON_BINARY}" -m venv venv
python -m venv venv
source venv/bin/activate

# Check the python version
python --version
python3 --version

# update pip
pip install --upgrade pip

TEST_ROOT=$(pwd)/${PIP_TEST_PREFIX}
rm -rf "$TEST_ROOT"
mkdir -p "$TEST_ROOT"
Expand Down
22 changes: 15 additions & 7 deletions kokoro/github/ubuntu/cpu/build_versioned.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,32 @@
set -e
set -x

cd "${KOKORO_ARTIFACTS_DIR}/github/gnn/"
PYENV_ROOT="/home/kbuilder/.pyenv"
PYTHON_VERSION=${PYTHON_VERSION:-"3.11"}

echo "Installing pyenv.."
git clone https://github.com/pyenv/pyenv.git "$PYENV_ROOT"
export PATH="/home/kbuilder/.local/bin:$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"

sudo apt-get install -y "python${PYTHON_VERSION}"
echo "Python setup..."
pyenv install -s "$PYTHON_VERSION"
pyenv global "$PYTHON_VERSION"

# Update alternatives, taken from corresponding Keras OSS test script
sudo update-alternatives --install /usr/bin/python3 python3 "/usr/bin/python$PYTHON_VERSION" 1
sudo apt-get install -y python$PYTHON_VERSION-venv
cd "${KOKORO_ARTIFACTS_DIR}/github/gnn/"

PYTHON_BINARY="/usr/bin/python${PYTHON_VERSION}"
PIP_TEST_PREFIX=bazel_pip

"${PYTHON_BINARY}" -m venv venv
python -m venv venv
source venv/bin/activate

# Debug messages to indicate the python version
python --version
python3 --version

# update pip
pip install --upgrade pip

TEST_ROOT=$(pwd)/${PIP_TEST_PREFIX}
rm -rf "$TEST_ROOT"
mkdir -p "$TEST_ROOT"
Expand Down
4 changes: 4 additions & 0 deletions kokoro/github/ubuntu/cpu/continuous.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ env_vars: {
key: "USE_BAZEL_VERSION"
value: "7.4.1" # TODO - b/390391579: Unpin once bazel 8 works.
}
env_vars: {
key: "PYTHON_VERSION"
value: "3.11"
}

action {
define_artifacts {
Expand Down
2 changes: 1 addition & 1 deletion kokoro/github/ubuntu/cpu/oldest/continuous.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env_vars: {
}
env_vars: {
key: "PYTHON_VERSION"
value: "3.9"
value: "3.11"
}
env_vars: {
key: "TF_VERSION"
Expand Down
2 changes: 1 addition & 1 deletion kokoro/github/ubuntu/cpu/oldest/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env_vars: {
}
env_vars: {
key: "PYTHON_VERSION"
value: "3.9"
value: "3.11"
}
env_vars: {
key: "TF_VERSION"
Expand Down
4 changes: 4 additions & 0 deletions kokoro/github/ubuntu/cpu/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ env_vars: {
key: "USE_BAZEL_VERSION"
value: "7.4.1" # TODO - b/390391579: Unpin once bazel 8 works.
}
env_vars: {
key: "PYTHON_VERSION"
value: "3.11"
}

action {
define_artifacts {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_version():
'tensorflow>=2.12.0,<3; platform_machine != "arm64" or platform_system != "Darwin"',
'tensorflow-macos>=2.12.0,<3; platform_machine == "arm64" and platform_system == "Darwin"',
# pylint:enable=g-line-too-long
'apache-beam',
'apache-beam>=2.54.0',
],
python_requires='>=3.9,<4',
packages=find_namespace_packages(
Expand Down
Loading