03/03/2022, 5:06 AM
Good morning everyone, I would like to know a really basic thing with Docker Agents. I have created a DockerAgent with all the necessary libraries which are needed for the flow to run. And then I started the Docker Agent using a docker-compose file. I can see the below logs:
[2022-03-03 05:10:35,310] INFO - TranslationEvaluator Agent | Registering agent...
[2022-03-03 05:10:36,108] INFO - TranslationEvaluator Agent | Registration successful!
[2022-03-03 05:10:36,498] INFO - TranslationEvaluator Agent | Starting DockerAgent with labels ['On_Prem_Agent', 'IP:<>']

[2022-03-03 05:10:36,498] INFO - TranslationEvaluator Agent | Agent documentation can be found at <>

[2022-03-03 05:10:36,498] INFO - TranslationEvaluator Agent | Waiting for flow runs...
I then went and created a Flow and registered the flow as a docker. But when I try to run the flow from the prefectUI, the flow starts running and I see the below lines in the log of the DockerAgent:
[2022-03-03 05:20:32,889] INFO - TranslationEvaluator Agent | Deploying flow run 9cf17c39-877c-49e7-aae4-0451e320bae4 to execution environment...

/usr/local/lib/python3.7/dist-packages/prefect/agent/docker/ UserWarning: DockerAgent `docker_interface` argument is deprecated and will be removed from Prefect. Setting it has no effect.


[2022-03-03 05:20:33,579] INFO - TranslationEvaluator Agent | Completed deployment of flow run 9cf17c39-877c-49e7-aae4-0451e320bae4

[2022-03-03 05:20:34+0000] INFO - prefect.CloudFlowRunner | Beginning Flow run for 'On_Prem_Agent'
But it fails, with some libraries are missing to do the logic in one of the tasks in the flow. I am under the impression that the agent I created needs to have all the libraries installed and the flow just run on the agent using them. What is the right way to do this, so that I can get this working. Thanks, Sen
Is it possible to run this flow directly in the docker prefect agent which I created without composing the flow into a docker image?


03/03/2022, 7:16 AM
Hi @Sen, please look at this thread - The above thread has a link to - this will give you an idea of how to bundle the package and use in image. Also a small request is that, For the next time post the questions in #prefect-community as you get more reach there and this is the intended channel for prefect related questions. #random is more for random questions, memes, etc.
👍 1
:upvote: 2


03/03/2022, 7:50 AM
ok that's cool.. should I delete this and move this question to the Prefect-community


03/03/2022, 10:14 AM
I believe it’s not needed. it’s alright for now