-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Login to ECR if needed for Local Mode #121
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
Conversation
This makes life easier in our Notebook instances.
Instead of having docker-compose generate a random network each time, use a constant network.
When running local mode the SDK will perform an ECR login if required.
@@ -390,7 +409,8 @@ def _build_optml_volumes(self, host, subdirs): | |||
return volumes | |||
|
|||
def _cleanup(self): | |||
_check_output('docker network prune -f') | |||
# we don't need to cleanup anything at the moment | |||
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.
Add a TODO (rignacio) here to remove this function later.
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.
I will not remove this function, I will add to it.
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.
Them add a TODO (rignacio) here to write this function later :)
ecr_url = auth['authorizationData'][0]['proxyEndpoint'] | ||
|
||
cmd = "docker login -u AWS -p %s %s" % (token, ecr_url) | ||
subprocess.check_output(cmd, shell=True) |
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.
Sometimes we are using _check_output and sometimes we are using subprocess.checkoutput. Can we just use one of them?
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 is a good reason for this. I will probably refactor this anyways.
Change instance count from 3 to 1
This also includes:
Use 'sagemaker-local' docker network for LocalMode