Hello everyone, what is the best way to package a ...
# ask-community
r
Hello everyone, what is the best way to package a python environment within a deployment using Prefect? • Should I package a venv within my Prefect directory (
/.venv
where all my dependancies are installed for instance) and push to, say, a s3 storage block? Will the agent use this environment? • Should I use the new project related
pip_install_requirements
pull step within my
prefect.yaml
file? In this case, can I pass a
pyproject.toml
or
poetry.lock
instead? • Should I make sure that, whatever happens, my agent runs into a python environment that shares the same dependancies as my deployment? • Is there another way I don't see? 🤔
j
I think it depends on your use case. If you want to run your flows in a container you can add a requirements.txt file when making a container-based deployment with a prefect.yaml file. If you are kicking off your flows using a process worker (basically a typed agent) you can just make sure it has the packages installed that are needed by your deployment.