Docker container infrastructure not being used

Hello,

preface:

  • we have a minio storage block used by the deployment
  • our code base is written in python and node. we run the node code via subprocess python module.
  • we have an image deriving from prefecthq/prefect:2.10.17-python3.10 which includes a node installation.
  • We created a Docker Container infrastrcture block which refrences the above image and is in use by our deployment (let’s call it ADeployment)
  • when running python code spawning node in our image via docker run every thing works

assumptions:

  • prefect uses my image to run the flow code on it, and that the flow code and any
    thing imported from that code is mounted on to that image from my storage
  • only flow code and what it imports is mounted on to my image, all other files are used from within my image (i.e. node code)

problem:

  • when running the same code in our flow ADeployment/AFlow it crashes with the error: ‘node not found’
  • additionally cwd which resides in my docker is not found when refrencing it subprocess.Popen

question:

  • Is my code being run on my docker container infrastrcture ? (based on my assumptions)
    • the problems above make me belive it’s not.
  • how can i make the flow code acctually run on my image ?

thanks in advance
Eran

Hi All,

What i ended up doing is checking where i am running by printing the hostname
i saw that i was indeed not in a docker container.

The thing is that i ran this flow in vscode inside a poetry env with prefect and it is not related to my infrastructure. when executing in an agent every thing worked as expected

thanks