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

Default image builder: Creates HOME if it does not exists #2562

Merged

Conversation

thomasjpfan
Copy link
Member

Why are the changes needed?

For some images, the $HOME directory does not exists yet. With this PR, it gets created. For example, if one specifies the normal flyte base image, it'll fail to build.

from flytekit import ImageSpec, task

image = ImageSpec(
    base_image="ghcr.io/flyteorg/flytekit:py3.12-1.13.0",
    packages=["pandas==2.2.2"],
    registry="localhost:30000",
)

@task(container_image=image)
def get():
    return

Note that the default image builder does not use the python environment from the base_image and creates its own Python environment.

How was this patch tested?

Unit test was updated in this PR.

@thomasjpfan thomasjpfan changed the title Makes home dir if it does not exists Default image builder: Creates HOME if it does not exists Jul 4, 2024
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.81%. Comparing base (a6a8651) to head (eee9eef).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2562      +/-   ##
==========================================
+ Coverage   76.27%   80.81%   +4.53%     
==========================================
  Files         183      209      +26     
  Lines       18716    19964    +1248     
  Branches     3694     3695       +1     
==========================================
+ Hits        14275    16133    +1858     
+ Misses       3804     3175     -629     
- Partials      637      656      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pingsutw pingsutw merged commit 4be4e33 into flyteorg:master Jul 5, 2024
48 checks passed
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
Signed-off-by: Thomas J. Fan <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
mao3267 pushed a commit to mao3267/flytekit that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants