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

[ci] support artifact mount for all containers #42205

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Conversation

can-anyscale
Copy link
Collaborator

Support artifact mount for all containers (linux + windows)

Test:

  • CI

@can-anyscale can-anyscale force-pushed the can-ts00 branch 2 times, most recently from e3ef6ec to 07520e4 Compare January 5, 2024 20:38
@can-anyscale can-anyscale marked this pull request as ready for review January 5, 2024 20:40
@can-anyscale can-anyscale requested a review from a team as a code owner January 5, 2024 20:40
@@ -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..."
Copy link
Collaborator

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?

Copy link
Collaborator Author

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)

@@ -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"
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

totally

Comment on lines 109 to 116

@abc.abstractmethod
def get_artifact_mount_host(self) -> str:
pass

@abc.abstractmethod
def get_artifact_mount_container(self) -> str:
pass
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

Copy link
Collaborator

@aslonnie aslonnie Jan 5, 2024

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.

Copy link
Collaborator Author

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>
@can-anyscale can-anyscale merged commit 152ef7f into master Jan 5, 2024
9 checks passed
@can-anyscale can-anyscale deleted the can-ts00 branch January 5, 2024 23:03
can-anyscale added a commit that referenced this pull request Jan 6, 2024
#42205 moved artifact mount to the parent container class so this line is now duplicated for linux

Signed-off-by: can <can@anyscale.com>
vickytsang pushed a commit to ROCm/ray that referenced this pull request Jan 12, 2024
Support artifact mount for all containers (linux + windows)

Signed-off-by: can <can@anyscale.com>
vickytsang pushed a commit to ROCm/ray that referenced this pull request Jan 12, 2024
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>
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.

2 participants