Skip to content
Merged
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
14 changes: 3 additions & 11 deletions sdks/python/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ RUN \

rm -rf /var/lib/apt/lists/* && \

pip install --upgrade pip setuptools wheel && \

# Install required packages for Beam Python SDK and common dependencies used by users.
# use --no-deps to ensure the list includes all transitive dependencies.
# use --prefer-binary to avoid compiling wheels from source when prebuilt wheels exist.
Expand Down Expand Up @@ -92,18 +90,12 @@ RUN \
if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
pip install upgrade_ensurepip; \
python3 -m upgrade_ensurepip; \
else \
python3 /tmp/upgrade_bundled_pip.py; \
fi; \
# setuptools is not bundled with ensurepip in Python 3.12+
if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
find /usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-* -type f ! -name $(basename $(ls -v /usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-*-py3-none-any.whl | tail -n 1)) -delete; \
fi; \
find /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-* -type f ! -name $(basename $(ls -v /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-*-py3-none-any.whl | tail -n 1)) -delete; \
if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
pip uninstall upgrade_ensurepip -y; \
else \
python3 /tmp/upgrade_bundled_pip.py; \
fi; \
python3 -m ensurepip;
find /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-* -type f ! -name $(basename $(ls -v /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-*-py3-none-any.whl | tail -n 1)) -delete;

ENTRYPOINT ["/opt/apache/beam/boot"]

Expand Down
Loading