Page MenuHomeElementl

Set entrypoint to empty when launching runs or steps iwth a custom command

Authored by dgibson on Mar 11 2021, 10:31 PM.



If we don't do this, the default beahvior is (i think) to append the command to whatever entrypoint has been set. This is almost certainly not what we want, at least in the docker deployment case where the entrypoint is 'dagster api grpc'.

Test Plan


Diff Detail

R1 dagster
Lint Passed
No Test Coverage

Event Timeline

alangenfeld edited reviewers, added: sashank; removed: alangenfeld.
alangenfeld added a subscriber: sashank.

@sashank went through this cmd vs entrypoint distinction on the k8s stuff not long ago. I can never keep it straight

In some cases, users want their entrypoint to _not_ be dagster, because they could be using something like conda. This is because dagster isn't an available command in their virtual environment. Here's an example of where a similar problem came up in dagster-k8s:

This is a bit different from k8s though because there is no separate command and args arguments. Trying to look into the Docker docs to see what we might want to do here.


Reading this:

I believe you want to separate this out into:

ENTRYPOINT ["dagster"]
CMD ["api", "grpc", "-h", "", "-p", "4000", "-f", ""]

And then make the commands in the launcher just: api execute_step {} and api execute_run_with_structured_logs {}. Then the launcher will respect the entrypoint in the Dockerfile, and the user can edit the entrypoint as needed.

sashank requested changes to this revision.Mar 15 2021, 6:36 PM

Let me know if my suggestion doesn't makes or doesn't result in the desired behavior you're trying to achieve here. Not 100% familiar with the docker run launcher.

This revision now requires changes to proceed.Mar 15 2021, 6:36 PM