Hello everyone, I have a flow and multiple tasks t...
# ask-community
s
Hello everyone, I have a flow and multiple tasks that have to run in a specific conda environment. For this I need to use a Docker Worker, but because of the infrastructure that this has to be deployed in, I am not able to create custom docker images. Is there a way to use a Prefect Conda Docker Image and update the environment with a specific environment file during the pull step? I have tried to use
prefect.deployments.steps.run_shell_script
where I run
conda env update --file <path_to_environment_file>
to install the required packages. This all works, but when the Flow is now executed in this docker container the installed packages aren't found.
n
hi @Steffen - what base image are you using? for example there are tags like
prefecthq/prefect:3.2.7-python3.12-conda
on dockerhub with `uv` pip or conda (most easily with uv) you can do stuff like this to install things at runtime
s
Hi @Nate - Thank you for your response. Yes, I've been using
prefecthq/prefect:3.2.7-python3.12-conda
as my base image. I'm currently working on some other stuff but I'll try out your recommendation in the upcoming days.