-
Notifications
You must be signed in to change notification settings - Fork 26
added GPU environment support #11
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
base: master
Are you sure you want to change the base?
Conversation
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.
It'd be great if we can add an example on how to use this and the compute_type
parameter in the README's Usage section as well https://github.com/aws-samples/sagemaker-studio-image-build-cli#usage
self.s3_location = s3_location | ||
self.role = role | ||
|
||
self.session = boto3.session.Session() | ||
self.domain_id, self.user_profile_name = self._get_studio_metadata() | ||
self.repo_name = None | ||
self.compute_type = compute_type or "BUILD_GENERAL1_SMALL" | ||
self.environment = environment or "LINUX_CONTAINER" |
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.
This default is being specified in multiple places - in the argument parsing and here. From what I can tell, the environment
param should always be non-null when we get to this point, so we can remove this or
check.
if self.environment=="LINUX_GPU_CONTAINER" and self.compute_type=="BUILD_GENERAL1_SMALL": | ||
self.compute_type="BUILD_GENERAL1_LARGE" |
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.
Question: Why is this required?
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.
BUILD_GENERAL1_LARGE will automatically switch to a GPU instance if LINUX_GPU_CONTAINER is set. Small or medium will not.
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.
Thanks. In that case, I recommend we make this explicit - Fail if the user is requested GPU and Small or Medium, because these are incompatible configuration options
Sorry for the long delay. I've updated the changes so |
Issue #, if available:
Issue #10
Description of changes:
Adds
--environment
option to setLINUX_GPU_CONTAINER
when build involves compiling Cuda operations.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.