-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[ci] support artifact mount for all containers #42205
Conversation
e3ef6ec
to
07520e4
Compare
@@ -25,8 +25,15 @@ if [ -d "/tmp/artifacts" ]; then | |||
find /tmp/artifacts -print || true | |||
fi | |||
|
|||
echo "Creating var/ artifact directory..." | |||
docker run --rm -v /tmp/artifacts:/artifact-mount alpine:latest /bin/sh -c 'chown -R 2000 /artifact-mount/' || true | |||
echo "Creating artifact directory..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the echo into the if too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the echo applies for both if clauses (linux vs. windows)
ci/ray_ci/windows_container.py
Outdated
@@ -37,3 +37,9 @@ def get_run_command_extra_args( | |||
) -> List[str]: | |||
assert not gpu_ids, "Windows does not support gpu ids" | |||
return [] | |||
|
|||
def get_artifact_mount_host(self) -> str: | |||
return "c:\\tmp\\artifacts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: C:\\
(capital C
) maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totally
ci/ray_ci/container.py
Outdated
|
||
@abc.abstractmethod | ||
def get_artifact_mount_host(self) -> str: | ||
pass | ||
|
||
@abc.abstractmethod | ||
def get_artifact_mount_container(self) -> str: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it one method that returns a tuple?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some use cases later on that I need one and not the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in those cases you can just drop the other return value?
like:
host, _ = self.get_artifact_mount_paths()
the two values are so closely related, that they should be put together.
and they are returning just constants; there are more boilerplate code than the meat now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sound good, let's do that
Signed-off-by: can <can@anyscale.com>
#42205 moved artifact mount to the parent container class so this line is now duplicated for linux Signed-off-by: can <can@anyscale.com>
Support artifact mount for all containers (linux + windows) Signed-off-by: can <can@anyscale.com>
ray-project#42205 moved artifact mount to the parent container class so this line is now duplicated for linux Signed-off-by: can <can@anyscale.com>
Support artifact mount for all containers (linux + windows)
Test: