https://prefect.io logo
Title
s

Scott Zelenka

03/29/2020, 5:18 PM
Hi Cloud users, interested in your suggestions. I have a Flow that executes great on my local dev machine. However, some of the logic within the Flow leverages a different application (XVBF & Google Chrome) that's also installed on my local dev machine. When I attempt to serialize the Flow into a Docker image, it doesn't run because the required application(s) aren't installed in the Docker image the
.register
generates. I can get the dependent application(s) to run inside a Docker image with supervisord, but that would require the entrypoint of Docker to somehow trigger supervisord before it attempts to execute the Flow. I couldn't find an API in Prefect to allow for this type of functionality? Another option is to provide the dependent application(s) as a native cloud service, and communicate over the network to access the same way I do it on my local dev machine.. but that'd be overkill for this one Flow. Curious if anyone has been successful in wrapping another (non-Python) application inside a serialized Flow to deploy on Prefect Cloud.
c

Chris White

03/29/2020, 5:41 PM
Hi Scott, really interesting question; a few thoughts come to mind: - we originally created the
on_start
hook on the environment class for situations like this; it is a Python hook but you might be able to get away with calling a subprocess here - We could definitely explore adding some pre-execute non-python hooks to the CLI endpoint that agents call to support this type of use case
s

Scott Zelenka

03/30/2020, 12:45 PM
Thanks Chris, Jason helped me hack around the need to run supervisord, so my immediate use case has been hacked around.