Longtime listener, first time caller. I am trying ...
# flyte-support
a
Longtime listener, first time caller. I am trying to use the containertask with a list of flytefile like this:
Copy code
calculate_ellipse_area_shell = ContainerTask(
   name="ellipse-area-metadata-shell",
   input_data_dir="/root/inputs",
   output_data_dir="/root/outputs",
   inputs=kwtypes(a=List[FlyteFile]),
   outputs=kwtypes(metadata=str),
   image="harbor.rke2/work:latest",
   command=[
       "/root/entrypoint.sh"
   ]
)
The container starts fine but can’t download the inputs and it looks like it cannot create the proper subdirectory that is named after the input variable name
Copy code
time="2024-08-14T16:41:49Z" level=info msg="[0] Couldn't find a config file []. Relying on env vars and pflags."
2024-08-14T16:41:49.653575850Z {"json":{},"level":"error","msg":"Failed to persist [a], err failed to open file at path /root/inputs/a/0: open /root/inputs/a/0: no such file or directory","ts":"2024-08-14T16:41:49Z"}
{"json":{},"level":"error","msg":"Downloading failed, err failed to download input variable from remote store: variable [a] download/store failed: failed to open file at path /root/inputs/a/0: open /root/inputs/a/0: no such file or directory","ts":"2024-08-14T16:41:49Z"}
Anyone else using lists of flytefiles with the ContainerTask?
a
I think you're hitting a limitation of Flyte copilot and FlyteFile as an input, This is not supported at the moment for Container Task. FlyteFile supported as output but not input (recent discussion)
t
flytedirectory isn't supported as input, but flytefile should work. have you tried sending a single flytefile to the container? does that work?
f
This is a simple addition that we need to contribute
a
Single flyte file works wonderfully it’s the list of them that seems to cause issues. I took a Quick Look at the code and maybe it has something to do with os.Create not being able to create the subdirectory, my go abilities are extremely new.
t
looks like this isn't supported either. would you mind creating an issue?