Hi, what should the ENTRYPOINT of my custom docker...
# ask-community
j
Hi, what should the ENTRYPOINT of my custom docker image (for executing runs in Kubernetes; not based on a prefect image) be? Right now I have it running my flow directly as described here: https://docs.prefect.io/latest/guides/docker/#writing-a-dockerfile but I'm getting a double flow-run - the first has the same name as my Kubernetes Pod so is presumably controlled by Prefect, but it gets stuck in "Pending" and never receives any logs from the flow. The second run has a different name than the pod and works normally (though it seems to have some problems the first time it runs on a new Node, but I'll worry about that later). Should I instead have something like
exec "$@"
as here: https://github.com/PrefectHQ/prefect/blob/main/scripts/entrypoint.sh ? Apologies if the solution is obvious/in the docs somewhere.
1
Here's some kubectl output which may be useful:
Copy code
$ kubectl get pods
NAME                                          READY   STATUS    RESTARTS   AGE
imaginary-dragonfly-sdk6v-tbhzh               1/1     Running   0          8s
prefect-worker-7b8b975b9-jckmd                1/1     Running   0          3h47m
...

$ kubectl get pods
NAME                                          READY   STATUS      RESTARTS   AGE
imaginary-dragonfly-sdk6v-tbhzh               0/1     Completed   0          30s
prefect-worker-7b8b975b9-jckmd                1/1     Running     0          3h47m
...

$ kubectl logs imaginary-dragonfly-sdk6v-tbhzh
22:45:51.176 | INFO    | prefect.engine - Created flow run 'tough-collie' for flow 'tie-gpu-test-flow'
22:45:51.178 | INFO    | Flow run 'tough-collie' - View at <http://quilt-nlb-d229189b4f6f3da2.elb.us-east-1.amazonaws.com:31997/flow-runs/flow-run/a6e4ca48-c845-481f-a185-699e36017cef>
<more normal logs for 'tough-collie'>
22:45:55.842 | INFO    | Flow run 'tough-collie' - Finished in state Completed()
goodbye
From Prefect, "imaginary-dragonfly", stuck in "Pending":
Copy code
Worker 'KubernetesWorker 6a1281c1-3213-4539-9423-3d63aa754b15' submitting flow run '77324192-00ec-4db0-92e8-ff0a244dba9e'
04:17:38 PM
prefect.flow_runs.worker
Creating Kubernetes job...
04:17:38 PM
prefect.flow_runs.worker
Completed submission of flow run '77324192-00ec-4db0-92e8-ff0a244dba9e'
04:17:38 PM
prefect.flow_runs.worker
Job 'boisterous-malkoha-rxlqd': Pod has status 'Pending'.
04:17:38 PM
prefect.flow_runs.worker
Job 'boisterous-malkoha-rxlqd': Pod has status 'Running'.
04:22:14 PM
prefect.flow_runs.worker
From Prefect, "tough-collie", Completes normally but no meta-logs:
Copy code
normal logs from get_run_logger().info() here
04:45:55 PM
prefect.flow_runs
Finished in state Completed()
04:45:55 PM
prefect.flow_runs
I figured it out - you want no
ENTRYPOINT
at all.