<#1698 Add requirements to imageSpec> Pull request...
# flyte-github
a
#1698 Add requirements to imageSpec Pull request opened by pingsutw TL;DR Add support passing requirements.txt to image spec. Type ☐ Bug Fix ☑︎ Feature ☐ Plugin Are all requirements met? ☑︎ Code completed ☑︎ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description Example
Copy code
from flytekit import task, workflow, ImageSpec

new_flytekit = "git+<https://github.com/flyteorg/flytekit@01f2d63221467face8d35ed0af5308bbb3e66eaa>"
image = ImageSpec(registry="pingsutw", packages=["pandas", new_flytekit], apt_packages=["git"], requirements="requirement.txt")


@task(container_image=image)
def bar():
    print("hello")
    print("hello")


@workflow
def wf() -> str:
    bar()
    return "hi"


if __name__ == '__main__':
    wf()
Tracking Issue NA Follow-up issue NA flyteorg/flytekit All checks have passed 30/30 successful checks