Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _invoke_docker_build_and_push(self, container_image_name):
build = cloud_build_types.Build()
if self._cloud_build_machine_type:
build.options = cloud_build_types.BuildOptions()
build.options.machineType = self._cloud_build_machine_type
build.options.machine_type = self._cloud_build_machine_type
build.steps = []
step = cloud_build_types.BuildStep()
step.name = 'quay.io/buildah/stable:latest'
Expand All @@ -262,10 +262,10 @@ def _invoke_docker_build_and_push(self, container_image_name):
build.steps.append(step)

source = cloud_build_types.Source()
source.storageSource = cloud_build_types.StorageSource()
source.storage_source = cloud_build_types.StorageSource()
gcs_bucket, gcs_object = self._get_gcs_bucket_and_name(gcs_location)
source.storageSource.bucket = os.path.join(gcs_bucket)
source.storageSource.object = gcs_object
source.storage_source.bucket = os.path.join(gcs_bucket)
source.storage_source.object = gcs_object
build.source = source
# TODO(zyichi): make timeout configurable
build.timeout = '7200s'
Expand Down
7 changes: 1 addition & 6 deletions sdks/python/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ RUN \
# Remove pip cache.
rm -rf /root/.cache/pip && \

# 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.
pip install upgrade_ensurepip; \
python3 -m upgrade_ensurepip; \
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; \
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; \
pip uninstall upgrade_ensurepip -y; \
# Ensure pip is available. upgrade_ensurepip is skipped - it fails on Python 3.12+ due to ensurepip structure changes.
python3 -m ensurepip;

ENTRYPOINT ["/opt/apache/beam/boot"]
Expand Down
6 changes: 3 additions & 3 deletions sdks/python/container/run_validatescontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ if [[ "$ARCH" == "x86" ]]; then
# Tag the docker container.
docker tag "apache/$IMAGE_NAME:$SDK_VERSION" "$CONTAINER:$TAG"

# Push the container
gcloud docker -- push $CONTAINER:$TAG
elif [[ "$ARCH" == "ARM" ]]; then
# Push the container (use docker push - gcloud docker is deprecated)
docker push $CONTAINER:$TAG
elif [[ "$ARCH" == "ARM" ]]; then
# Reset the multi-arch Python SDK container image tag.
TAG=$MULTIARCH_TAG
MACHINE_TYPE_ARGS="--machine_type=t2a-standard-1"
Expand Down
Loading