It would be nice if we could have something like a boolean flag that controls if local container tasks output logs to the terminal.
I think think could be added somewhere around here using the .logs() method of the docker client shown on this page.
An example of the SDK UX could be something like this:
from flytekit import ContainerTask, workflow
echo_container_task = ContainerTask(
name="echo",
image="alpine:latest",
command=["echo", "'a test to show stdout'"],
local_logs=True,
)
@workflow
def echo_workflow() -> None:
return echo_container_task()
if __name__ == "__main__":
print(echo_workflow())
where local_logs is ignored if it is a remote execution.
It would be nice if we could have something like a boolean flag that controls if local container tasks output logs to the terminal.
I think think could be added somewhere around here using the
.logs()method of the docker client shown on this page.An example of the SDK UX could be something like this:
where
local_logsis ignored if it is a remote execution.