beam icon indicating copy to clipboard operation
beam copied to clipboard

[Distroless] Enable Distroless Python SDK (non-ML) based container

Open damondouglas opened this issue 1 year ago • 0 comments

Summary

Add distroless variants to existing Python SDK container images:

  • beam-sdk/beam_python3.9_sdk
  • beam-sdk/beam_python3.10_sdk
  • beam-sdk/beam_python3.11_sdk
  • beam-sdk/beam_python3.12_sdk

Description

The Publish Beam SDK Snapshots, PreCommit Python Docker, and build_release_candidate GitHub workflows build and publish Beam container images using docker. The distroless base images by design lack tools assumed to exist in Python Dockerfiles such as pip, and many file system tools. In order to reuse the existing Dockerfile to add a distroless variant, we need to employ a multi-stage build approach.

Blockers

  • [ ] #32819
  • [ ] #32820

Measures of Done

  • [ ] Refactor Python SDK Dockerfile to add distroless variants
  • [ ] Gradle :docker tasks can build existing non-distroless Python SDK variants and new distroless for specified Python versions

damondouglas avatar Oct 16 '24 19:10 damondouglas