Hello everyone! Is there any way of mounting a data volume in a ContainerTask? I need to provide a directory with an arbitrary number of files, read them, and apply some processing. The way I do it ususally is by mounting a volume when running docker run, but now I’m transforming it to a Flyte pipeline and have had some issues. What I’m trying to do is to pass it as a FlyteDirectory, but it’s not working as I expected.
I’m doing it like this:
ContainerTask(
name="my_container",
image="localhost:30000/my_container:latest",
input_data_dir="/input",
output_data_dir="/output",
inputs=kwtypes(
config_file=FlyteFile,
my_dir=FlyteDirectory,),
outputs=kwtypes(out=FlyteDirectory),
command=[
"python app.py --input_dir=/input/my_dir --config=/input/config_file"
]
)
I was expecting the
/input
directory to contain a dir called
my_dir
and a file called
config_file
. However, it seems to be empty.
Can someone help me figure out how to mount data? Thanks 🙌