<#3231 Adds ImageSpec.with_runtime_packages> Pull ...
# flyte-github
c
#3231 Adds ImageSpec.with_runtime_packages Pull request opened by thomasjpfan ## Why are the changes needed? This PR adds the ability to install runtime python dependencies. from flytekit import ImageSpec, task image = ImageSpec(base_image="localhost30000/flytekit0.1.5", builder="noop") @task(container_image=image.with_runtime_packages(["arize-phoenix-client"])) def check_phoenix() -> int: from phoenix.client import Client return 10 ## What changes were proposed in this pull request? This PR adds: • A
builder="noop"
that returns the original
base_image
• A
imagespec.with_dev_packages(...)
to install packages during runtime. • Passes the dev packages through an environment variable. • Updates the entrypoint to install the packages. ## How was this patch tested? I built the
Dockerfile.dev
and ran the above task. ### Summary by Bito This PR adds support for runtime Python dependencies through a new runtime_packages parameter in ImageSpec. It enhances functionality by modifying the entrypoint script for handling subprocess signals, updating container configuration for dependency variables, and providing a mechanism for dynamically installing required packages at runtime, streamlining dependency management. Unit tests added: True Estimated effort to review (1-5, lower is better): 2 flyteorg/flytekit