Hello,
What would be the best way to run external docker containers as prefect tasks?
I have a pipeline/flow that is supposed to run a few "external" docker images on some data (sequentially, where one's output (or part of it) is used as input for the next task). The docker images contain python scripts/modules that are not integrated with prefect. I would like to be able to pull those images from the private registry, and run containers based on images with custom parameters (based on settings defined by the user , that I pass to my flows). The pipeline is meant to be used by users with no prefect knowledge who can just git pull, install everything with pip and run it providing some custom parameters. That's why I would prefer not to go for orion infrastructure blocks and deployment but rather hide all prefect magic under python CLI.
The naive approach I was thinking about is to have a custom docker executor class/module (running containers) that methods will be called by prefect tasks, but maybe there is a better way to make it work? I am completely new to prefect, so any advice is much appreciated.