Hi all, I'm trying to run a flow in a docker image...
# ask-community
p
Hi all, I'm trying to run a flow in a docker image, I managed to deploy and apply the flow, while running I get the following error
Copy code
+ echo 'Non-spark-on-k8s command provided, proceeding in pass-through mode...'
Non-spark-on-k8s command provided, proceeding in pass-through mode...
+ CMD=("$@")
+ exec /usr/bin/tini -s -- python -m prefect.engine
[FATAL tini (14)] exec python failed: No such file or directory
looks like the image should have some mandatory software ? do I need to install prefect inside this image? are the pre-requisites documented anywhere ?
n
hi @Prasanth Kothuri - what base image are you using? it looks like
tini
isn't installed on whatever image you're using
p
hi Nate, it does have tini
Copy code
root@dd6eb75ffb4d:/# which tini
/usr/bin/tini
i think it doesn't have python, has python3, I can do the following
Copy code
ln -s /usr/bin/python3 /usr/bin/python
my worry is what else is required, does the image need prefect to be installed ?
n
ahh yes I see that now
does the image need prefect to be installed ?
yes, otherwise you won't be able to invoke the engine here
python -m prefect.engine
unless you have specific requirements that conflict with prefect base images, I generally find it easiest to start from a prefect base image like
prefecthq/prefect:2.8.2-python3.10
and then install whatever other things your flow will need on top of that, since prefect images will have everything you need to run a flow
p
for now I have installed the following and it seems to work
Copy code
pip3 install prefect==2.8.2 && \
    pip3 install s3fs && \
    pip3 install prefect_shell && \
👍 1