and other tools like poetry and venv behave similarly, in that they don’t expect projects to be installed globally, and are instead expected to be scoped to an environment on the host.
where prefect is a project dependency, among many.
I expect that the flow run will fail, as the prefect invocation is outside the bounded scope of a project installed with pdm. This is similar to how govendor and bundler work.
pip install prefect
pdm run prefect execute flow-run
to be on the global path of any image but the prefect image, and if I’m installing a project globally (basically at the OS level) I’m breaking modularity and the setup for that has to deviate substantially from installing a project locally for development work.
in your container is the last of flexibility in the command attached to for
. I think the best way to go about this is to expose some functionality to change that. I don’t know what the sentiment around that will be. A lot of people request this in a different context: they want to add their own CustomFlowRunner class that is used. I will write up an issue for this later or tomorrow.
prefect execute flow-run