Skip to content

Commit 38db556

Browse files
committed
fix breakages
1 parent 63c2f79 commit 38db556

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

sdks/python/container/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN \
5151

5252
# Install required packages for Beam Python SDK and common dependencies used by users.
5353
# use --no-deps to ensure the list includes all transitive dependencies.
54-
uv pip install --no-deps -r /tmp/base_image_requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu && \
54+
uv pip install --no-deps -r /tmp/base_image_requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu --system --index-strategy "unsafe-best-match" && \
5555
rm -rf /tmp/base_image_requirements.txt && \
5656
python -c "import nltk; nltk.download('stopwords')" && \
5757
rm /root/nltk_data/corpora/stopwords.zip && \
@@ -75,24 +75,24 @@ RUN \
7575

7676
# Install Apache Beam SDK. Use --no-deps and pip check to verify that all
7777
# necessary dependencies are specified in base_image_requirements.txt.
78-
uv pip install --no-deps -v /opt/apache/beam/tars/apache-beam.tar.gz[gcp] && \
78+
uv pip install --no-deps -v /opt/apache/beam/tars/apache-beam.tar.gz[gcp] --system && \
7979
uv pip check || (echo "Container does not include required Beam dependencies or has conflicting dependencies. If Beam dependencies have changed, you need to regenerate base_image_requirements.txt files. See: https://s.apache.org/beam-python-requirements-generate" && exit 1) && \
8080

8181
# Log complete list of what exact packages and versions are installed.
82-
uv pip freeze --all && \
82+
uv pip freeze && \
8383

8484
# Remove pip cache.
8585
rm -rf /root/.cache/pip && \
8686

8787
# Update ensurepip to use most recent versions of setuptools and pip. This avoids some vulnerabilities which won't be fixed on older versions of python.
88-
uv pip install upgrade_ensurepip; \
88+
uv pip install upgrade_ensurepip --system; \
8989
python3 -m upgrade_ensurepip; \
9090
# setuptools is not bundled with ensurepip in Python 3.12+
9191
if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
9292
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; \
9393
fi; \
9494
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; \
95-
pip uninstall upgrade_ensurepip -y; \
95+
uv pip uninstall upgrade_ensurepip -y --system; \
9696
python3 -m ensurepip;
9797

9898
ENTRYPOINT ["/opt/apache/beam/boot"]
@@ -112,7 +112,7 @@ COPY target/go-licenses/* /opt/apache/beam/third_party_licenses/golang/
112112

113113
COPY target/license_scripts /tmp/license_scripts/
114114
RUN if [ "$pull_licenses" = "true" ] ; then \
115-
pip install 'pip-licenses<6' pyyaml tenacity && \
115+
uv pip install 'pip-licenses<6' pyyaml tenacity --system && \
116116
python /tmp/license_scripts/pull_licenses_py.py ; \
117117
fi
118118

0 commit comments

Comments
 (0)