plain-carpenter-67621
09/14/2022, 5:05 AMPythonInstanceTask
type plugin. I need to reference the default image that this task will run on, during remote execution. how can i reference that? thanks!tall-lock-23197
tall-lock-23197
plain-carpenter-67621
09/14/2022, 6:08 AMcontainer_image
.during task definition.
I need to reference the default image uri that was provided while serializing the task.
How can that be done?plain-carpenter-67621
09/14/2022, 6:12 AMtall-lock-23197
plain-carpenter-67621
09/14/2022, 6:16 AMtall-lock-23197
PythonInstanceTask
as well.plain-carpenter-67621
09/14/2022, 6:20 AMpyflyte —-pkgs workflows.example package —-image <image_uri>
tall-lock-23197
plain-carpenter-67621
09/14/2022, 6:22 AMexecute()
. methodplain-carpenter-67621
09/14/2022, 6:23 AMglamorous-carpet-83516
09/14/2022, 6:24 AMglamorous-carpet-83516
09/14/2022, 6:47 AMENV FLYTE_INTERNAL_IMAGE=<image_uri>
to the dockerfile like this.
and then you are able to retrieve it by using
def execute(self, **kwargs) -> Any:
image = self.container_image or os.getenv("FLYTE_INTERNAL_IMAGE")
plain-carpenter-67621
09/14/2022, 2:59 PMglamorous-carpet-83516
09/14/2022, 3:08 PMappend(r(taskContainer.GetEnv()), {FLYTE_INTERNAL_IMAGE: taskContainer.GetImage()})
glamorous-carpet-83516
09/14/2022, 3:09 PMplain-carpenter-67621
09/14/2022, 5:52 PMplain-carpenter-67621
09/14/2022, 5:56 PManother way to achieve it is append an image_url to env by defaultthis would require change in the backend plugin? @glamorous-carpet-83516
glamorous-carpet-83516
09/15/2022, 4:14 AM