Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ENTRYPOINT and tini to support Dask KubeCluster #29

Merged

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Dec 19, 2023

To better support custom initalization of Dask KubeCluster container args, switch to using an ENTRYPOINT with tini.

For Dask KubeCluster, to customize the arguments passed to the container, spec["spec"]["scheduler"]["spec"]["containers"][0]["args"] (or "worker") expects that the args are able to be given directly as the container CMD without any additional setup. To ensure environmental setup in advance, an ENTRYPOINT should be used instead, as is done in https://github.com/dask/dask-docker/blob/fcb9fb839fb1085714b2ee4cbaca1c910ded5bba/base/Dockerfile#L32.

* Use an ENTRYPOINT to ensure /release_setup.sh is sourced to provide the
  correct environment.
   - For customized container commands to be given to Dask KubeClusters the
     args need to be able to be passed as CMD without additional environmental
     setup or an additional shell being spawned.
   - c.f. https://kubernetes.dask.org/en/latest/operator_kubecluster.html#customising-your-cluster
* Use tini to better support and guard this behavior.
   - c.f. https://github.com/krallin/tini

@matthewfeickert matthewfeickert added the enhancement New feature or request label Dec 19, 2023
@matthewfeickert matthewfeickert self-assigned this Dec 19, 2023
@matthewfeickert matthewfeickert changed the title feat: Add entrypoint and tini to support Dask KubeCluster feat: Add ENTRYPOINT and tini to support Dask KubeCluster Dec 20, 2023
@matthewfeickert matthewfeickert merged commit a12d66e into main Dec 20, 2023
1 check passed
@matthewfeickert matthewfeickert deleted the feat/switch-to-entrypoint-to-work-with-kube-cluster branch December 20, 2023 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant