Skip to content

[Core] start worker in container - #16671

Merged
ericl merged 26 commits into
ray-project:masterfrom
antgroup:worker_in_container_redesign
Jun 29, 2021
Merged

ericl merged 26 commits into
ray-project:masterfrom
antgroup:worker_in_container_redesign

Conversation

@chenk008

@chenk008 chenk008 commented Jun 25, 2021 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

We want to use container image to support different dependencies.
This is the first pull request to implements that feature, worker process will be started in specified container image by using Podman,

Based on the discussion in #15976, this PR uses setup_worker.py to start container. I moved the setup_runtime_env into the container, there are two reasons:

  1. Pip and conda will only affect the runtime in this container
  2. Sometimes pip will cause high cpu usage , I want use container to limit it.

We will add resource limit in next PR.

Related issue number

#14077

Checks

@rkooo567 rkooo567 self-assigned this Jun 26, 2021
@chenk008 chenk008 changed the title [WIP][Core] start worker in container [Core] start worker in container Jun 28, 2021
@chenk008
chenk008 requested review from ericl and jovany-wang June 29, 2021 05:25
@chenk008
chenk008 force-pushed the worker_in_container_redesign branch from 52bd87e to 7fdbe5d Compare June 29, 2021 05:44

@ericl ericl 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, thanks for taking the time to integrate this into runtime_envs properly! Have some comments but let's merge so this can be more easily tried out.

Comment thread .buildkite/pipeline.yml
commands:
- LINUX_WHEELS=1 ./ci/travis/ci.sh build
- pip install docker
# We build image ray-nest-container:nightly-py36-cpu which have installed podman,but not push it.

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.

nit: maybe call this ray-worker-container (can rename later)

dependency will be automatically installed into the docker image
to ensure compatibility with the cluster Ray. The `run_options`
dict spec is here: https://docs.docker.com/engine/reference/run/
container_option (dict): Require a given (Docker) container image,

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.

Maybe just container? (can change later)

@ericl

ericl commented Jun 29, 2021

Copy link
Copy Markdown
Contributor

Windows flaky tests also occur on master.

@ericl
ericl merged commit c318293 into ray-project:master Jun 29, 2021
@jovany-wang
jovany-wang deleted the worker_in_container_redesign branch June 30, 2021 02:20
@caitengwei caitengwei added this to the Containerized Workers milestone Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants