10/28/2022, 9:16 AM
Hello, I want to run a flow (Prefect 2.x) in a conda environment. Should I activate the environment via the deployment yaml (as described here:
) or should/could I use a Process block for that? What would you recommend?
10/28/2022, 10:13 AM
Good question, I'd use a Process block as described there
10/28/2022, 10:46 AM
10/28/2022, 10:48 AM
as described in this Discourse
essentially overwriting the command
10/28/2022, 10:51 AM
So editing the deployment yaml and not using a process block? Or does this boil down to the same thing? Because the discourse post I linked edits the deployment yaml file.
10/28/2022, 11:09 AM
yes exactly, this would involve editing the deployment there is actually an easier way: you can activate your conda environment before starting an agent
Process runs everything in the agent process so it would already use your conda env/venv
however, if you need per deployment isolation, I strongly recommend switching to DockerContainer, it makes everything that much easier if building an image is hard, try this
10/28/2022, 11:51 AM
I would, but I am not allowed to use docker in our environment. And I don't want to start an agent for every possible flow-environment combination. Then I will do as described on discourse. Thanks!
gratitude thank you