One question I have, I was not really able to make...
# flyte-support
n
One question I have, I was not really able to make it work so far. How do you return a FlyteDirectory from a ContainerTask ? The documentation has exemple with FlyteFiles, and it does not seems to work in my exemple code below:
Copy code
from flytekit import ContainerTask, kwtypes, FlyteDirectory

produce_data = ContainerTask(
    name="produce_data",
    image="alpine:3.18",
    command=["sh", "-c"],
    arguments=[
        # Important: write to the output path that Flyte provides
        "mkdir -p /var/flyte/output/results && echo 'hello' > /var/flyte/output/results/hello.txt"
    ],
    output_data_dir="/var/flyte/output",  # :white_check_mark: ensures Flyte watches this dir
    outputs=kwtypes(results=FlyteDirectory),
)
Do you guys have some working exemple of ContainerTask returing FlyteDirectory ?