Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requirements to imageSpec #1698

Merged
merged 7 commits into from
Jul 5, 2023
Merged

Add requirements to imageSpec #1698

merged 7 commits into from
Jul 5, 2023

Conversation

pingsutw
Copy link
Member

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

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

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw marked this pull request as ready for review June 26, 2023 21:26
Signed-off-by: Kevin Su <pingsutw@apache.org>
@cosmicBboy
Copy link
Contributor

is this ready to go @pingsutw ?

@pingsutw pingsutw merged commit da21782 into master Jul 5, 2023
122 checks passed
fg91 pushed a commit that referenced this pull request Aug 15, 2023
Signed-off-by: Kevin Su <pingsutw@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants