https://prefect.io logo
Title
j

Jelle Vegter

12/12/2022, 2:01 PM
I’m attempting to set up Prefect 2.0 and I want to run flows in a docker container. My docker image is in an Azure Registry. I created a block referring to the image. I’m getting the following error: No module named prefect.engine.__main__; ‘prefect.engine’ is a package and cannot be directly executed. Any clue what I’m misssing?
1
r

redsquare

12/12/2022, 2:18 PM
what does your dockerfile look like
j

Jelle Vegter

12/12/2022, 2:20 PM
It’s quite extensive. Adds this among other things
This dockerfile is registered to the Azure Container Registry, which I reference in the Prefect Block
r

redsquare

12/12/2022, 2:29 PM
try prefect:2-latest
j

Jelle Vegter

12/12/2022, 2:33 PM
Great, looks like that might be it. Thanks!
👍 1
Switched the base image to prefect:2-python3.9 but I still get the same error
any other ideas?
r

redsquare

12/12/2022, 4:33 PM
probably the workdir change
prefect image does
WORKDIR /opt/prefect
your changing it
j

Jelle Vegter

12/12/2022, 4:34 PM
would this have switched with prefect2? The setup is operational for prefect1
r

redsquare

12/12/2022, 4:36 PM
I never used p1 sorry
j

Jelle Vegter

12/12/2022, 4:36 PM
Ill update the dockerfile and try again