https://prefect.io logo
Title
g

Ghislain Picard

08/30/2022, 7:14 AM
Hi, how to run a flow in a specific conda environment (using Process infrastructure). I see two options: - run a specific worker agent in a conda environment, and link the flow to that agent. - use the “command” option of the Process infrastructure to point to the specific python binary of that environment. What is the best practice ? Is there any other option ?
1
j

Jeff Hale

08/30/2022, 11:52 AM
If you’re running Prefect locally with prefect 2.1+, your first option is easiest. Just start an agent in your conda environment with
prefect agent start -q my_work_queue
.
z

Zanie

08/30/2022, 5:20 PM
This is mostly dependent on where you want to configure this. If you want to configure it per flow, then you should set the command on the deployment. If you want to configure it per agent, then you should start the agent in the environment.
👍 2