Skip to content

[runtime env] Move container related code to runtime env - #19067

Merged
simon-mo merged 20 commits into
ray-project:masterfrom
antgroup:move_container_env_to_runtime
Oct 29, 2021
Merged

simon-mo merged 20 commits into
ray-project:masterfrom
antgroup:move_container_env_to_runtime

Conversation

@chenk008

@chenk008 chenk008 commented Oct 4, 2021

Copy link
Copy Markdown
Contributor

Why are these changes needed?

We will use runtime env to manager worker runtime. This pull request is trying to make the container related code as a runtime env plugin.

Related issue number

Checks

@simon-mo simon-mo self-assigned this Oct 4, 2021

@simon-mo simon-mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

Comment on lines +43 to +44
def __init__(self, tmp_dir: str):
self._tmp_dir = tmp_dir

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename this to mount dir? or ray_tmp_dir so it's more clear about what is it used for

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have renamed it to ray_tmp_dir, and added comment.


def __init__(self,
command_prefix: List[str] = None,
container_command_prefix: List[str] = None,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't change this. you can modify self.py_exectuable or self.command_prefix in ContainerManager.setup instead of adding a new entry.

@chenk008 chenk008 Oct 7, 2021 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestion. I use self.py_exectuable instead of container_command_prefix

@chenk008

Copy link
Copy Markdown
Contributor Author

@simon-mo Please take a look if you have a moment, Thanks.

And should we revert the ci test about worker-in-container?

@chenk008
chenk008 requested a review from simon-mo October 12, 2021 03:35
fix lint

fix
@chenk008
chenk008 force-pushed the move_container_env_to_runtime branch from 9833895 to f902126 Compare October 12, 2021 07:25
@simon-mo

Copy link
Copy Markdown
Contributor

@chenk008 if you can turn on that test that would be greatly appreciated! I disabled it because one day podman just broke and I can't find a way fixing it.

@simon-mo simon-mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Language.Value(args.language))
# NOTE(chenk008): if worker starts in a container, this worker-shim-pid
# is required. It is compatible to add this for all worker.
remaining_args.append("--worker-shim-pid={}".format(os.getpid()))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume this will be removed soon?

@simon-mo

Copy link
Copy Markdown
Contributor

Please fix the merge conflict when ping me when tests pass. Thanks!

Comment thread python/ray/workers/setup_worker.py Resolved
@simon-mo simon-mo added @author-action-required @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. and removed @author-action-required labels Oct 28, 2021
@chenk008

Copy link
Copy Markdown
Contributor Author

@simon-mo Sorry for delayed response. I think worker-shim-pid is still require, otherwise the worker will failed to register. I will try to clean it in next PR.

@chenk008
chenk008 requested a review from simon-mo October 29, 2021 08:24
@simon-mo
simon-mo merged commit 5736399 into ray-project:master Oct 29, 2021
@simon-mo

Copy link
Copy Markdown
Contributor

@chenk008 thanks! just to confirm, you will try to re-enable the work-in-container test as well right?

@chenk008

Copy link
Copy Markdown
Contributor Author

@chenk008 thanks! just to confirm, you will try to re-enable the work-in-container test as well right?

@simon-mo Yes, I will create a new PR to re-enable the work-in-container test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants