@doc I actually just cross-checked that and this should already be possible, the only issue you need to be careful about is to provide that command as a list
this issue comment explains it more and shows an example: Add support for virtual environments on the `Process` infrastructure block · Issue #7379 · PrefectHQ/prefect · GitHub
I also updated this Discourse topic - it should now provide more helpful setup on how to configure this:
There are several ways how you can accomplish that.
Run the agent directly in the virtual environment from which you want to execute the flow runs
Assuming that your agent is already running in the virtual environment that has all required dependencies. In that case, you don’t need to do anything else on your infrastructure block or deployment - the default Process block will already work out of the box.
Adjust the YAML file
Another option is to adjust the YAML deployment file before apply…
1 Like