Skip to content

chore(multiple samples): bump TensorFlow and downgrade python/beam on Dockerfiles#14384

Draft
XrossFox wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
XrossFox:package-update-tensorflow
Draft

chore(multiple samples): bump TensorFlow and downgrade python/beam on Dockerfiles#14384
XrossFox wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
XrossFox:package-update-tensorflow

Conversation

@XrossFox

@XrossFox XrossFox commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

Fixing dependabot alerts:

  • Update TensorFlow to 2.21.0 and Apache Beam to 2.74.0 across samples.
  • Modify Dockerfiles to use Python 3.13 and matching beam images due to compatibility with the updated CUDA base image (12.5.1).
  • Remove pytest version constraints in requirements-test.txt

Fixes b/531809402

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

…n Dockerfiles

 - Update TensorFlow to 2.21.0 and Apache Beam to 2.74.0 across samples.
 - Modify Dockerfiles to use Python 3.13 and matching beam images due to compatibility with the updated CUDA base image
   (`12.5.1`).
 - Remove pytest version constraints in `requirements-test.txt`
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: people-and-planet-ai labels Jul 6, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several Dockerfiles and dependency files to upgrade TensorFlow to 2.21.0, Apache Beam to 2.74.0, and transition Python environments from 3.14 to 3.13. Feedback was provided on three Dockerfiles pointing out that installing python3-distutils via apt-get is redundant and should be removed, as distutils is no longer present in Python 3.13 and the package only installs for the system default Python 3.10.

# Install Python and other system dependencies.
&& apt-get install -y --no-install-recommends \
curl g++ python3.14-dev python3.14-venv python3-distutils \
curl g++ python3.13-dev python3.13-venv python3-distutils \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

With the upgrade to Python 3.13, the distutils package has been completely removed from the standard library (deprecated since Python 3.10 and removed in Python 3.12). Installing python3-distutils via apt-get is redundant as it only installs the package for the system default Python (Python 3.10 on Ubuntu 22.04) and does not provide it for Python 3.13. It can be safely removed.

        curl g++ python3.13-dev python3.13-venv \

# Install Python and other system dependencies.
&& apt-get install -y --no-install-recommends \
curl g++ python3.14-dev python3.14-venv python3-distutils \
curl g++ python3.13-dev python3.13-venv python3-distutils \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

With the upgrade to Python 3.13, the distutils package has been completely removed from the standard library (deprecated since Python 3.10 and removed in Python 3.12). Installing python3-distutils via apt-get is redundant as it only installs the package for the system default Python (Python 3.10 on Ubuntu 22.04) and does not provide it for Python 3.13. It can be safely removed.

    curl g++ python3.13-dev python3.13-venv \

# Install Python and other system dependencies.
&& apt-get install -y --no-install-recommends \
curl g++ python3.14-dev python3.14-venv python3-distutils \
curl g++ python3.13-dev python3.13-venv python3-distutils \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

With the upgrade to Python 3.13, the distutils package has been completely removed from the standard library (deprecated since Python 3.10 and removed in Python 3.12). Installing python3-distutils via apt-get is redundant as it only installs the package for the system default Python (Python 3.10 on Ubuntu 22.04) and does not provide it for Python 3.13. It can be safely removed.

        curl g++ python3.13-dev python3.13-venv \

@XrossFox XrossFox force-pushed the package-update-tensorflow branch from 0da0935 to ebdd931 Compare July 6, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: people-and-planet-ai samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants