Pooyan
11/12/2023, 4:01 AMmap
on the task so I can run them concurrently. But I probably can not have a task that complicated. The way I understand the above tasks now, it seems each of them should be a flow. So now I have a basic question, how do I run a container from prefect so it does some stuff. Im not looking to run my flow inside container. It seems thats what deploying a flow with job_variables
and running it does.Marvin
11/12/2023, 4:04 AMkubectl get pods -n prefect
. You should see the Prefect worker pod running. More Info
As for running a container from Prefect, I couldn't find a direct answer in the documentation. However, since Prefect is a workflow orchestration tool, it should be possible to define a task that runs a container. You might need to use the Kubernetes API or a Kubernetes Python client to create and manage the container from within the task.
As for using map
for concurrent execution, it should be possible as long as each task is independent and can be run concurrently.
Please note that this is a general guidance and you might need to adjust based on your specific use case and environment.