-
Notifications
You must be signed in to change notification settings - Fork 297
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
Use ImageSpec inside raw container task #1944
Conversation
Signed-off-by: Kevin Su <pingsutw@apache.org>
cc @zeryx |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1944 +/- ##
==========================================
+ Coverage 85.04% 85.80% +0.75%
==========================================
Files 280 313 +33
Lines 21751 23285 +1534
Branches 3526 3528 +2
==========================================
+ Hits 18498 19979 +1481
- Misses 2650 2702 +52
- Partials 603 604 +1 ☔ View full report in Codecov by Sentry. |
Super exciting, ImageSpec is supported independently from envd, right? |
yes, exactly. we should also be able to use docker plugin to build the image. |
@pingsutw I do not see that behavior in my test cases, am I instantiating ImageSpec wrong? commandline:
Script:
Error:
|
@danpf you could change the default builder to docker you added. running_imagespec = ImageSpec(packages=["pandas", "numpy"], builder="docker") |
I think it won't, because the docker builder won't be registered either. Actually though, you are technically right! A Task does not need the builder registered, but dynamic does. running the task directly succeeds. |
@@ -112,8 +114,15 @@ def _get_data_loading_config(self) -> _task_model.DataLoadingConfig: | |||
def _get_container(self, settings: SerializationSettings) -> _task_model.Container: | |||
env = settings.env or {} | |||
env = {**env, **self.environment} if self.environment else env | |||
if isinstance(self._image, ImageSpec): | |||
if settings.fast_serialization_settings is None or not settings.fast_serialization_settings.enabled: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use get_registerable_container_image to resolve the image name so it can also handle the case like {{.image.default.fqn}}:{{.image.default.version}})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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: Rafael Raposo <rafaelraposo@spotify.com>
TL;DR
Build ImageSpec if people pass a imageSpec inside raw container task.
Type
Are all requirements met?
Complete description
Tracking Issue
flyteorg/flyte#4070
Follow-up issue
NA