acoustic-carpenter-78188
07/29/2024, 6:08 PM.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.
flyteorg/flyteacoustic-carpenter-78188
07/29/2024, 6:08 PM