-
Notifications
You must be signed in to change notification settings - Fork 138
feat: support codeartifact for installing requirements.txt packages #187
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,3 +50,34 @@ def test_install_requirements(capsys): | |
| assert "Installing collected packages: pyfiglet" in stdout | ||
| assert "Successfully installed pyfiglet-0.8.post1" in stdout | ||
| assert "Reporting training SUCCESS" in stdout | ||
|
|
||
|
|
||
| # def test_install_requirements_from_codeartifact(capsys): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will you enable this test later?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, for this to really be enabled, it requires that the build infrastructure for this package to actually have a codeartifact repo which I believe it doesn't. So, at the moment, the answer is no, I don't think I can enable this on my own. |
||
| # # TODO: fill in details for CA | ||
| # ca_domain = "..." | ||
| # ca_domain_owner = "..." | ||
| # ca_repository = "..." | ||
| # ca_region = "..." | ||
| # ca_repository_arn = "..." | ||
| # | ||
| # estimator = Estimator( | ||
| # image_uri="sagemaker-training-toolkit-test:dummy", | ||
| # # TODO: Grant the role permissions to access CodeArtifact repo (repo resource policy + role policy) | ||
| # # https://docs.aws.amazon.com/codeartifact/latest/ug/security-iam.html | ||
| # # https://docs.aws.amazon.com/codeartifact/latest/ug/repo-policies.html | ||
| # role="SageMakerRole", | ||
| # instance_count=1, | ||
| # instance_type="local", | ||
| # environment={ | ||
| # "CA_REPOSITORY_ARN": ca_repository_arn, | ||
| # } | ||
| # ) | ||
| # | ||
| # estimator.fit() | ||
| # | ||
| # stdout = capsys.readouterr().out | ||
| # | ||
| # assert "{}-{}.d.codeartifact.{}.amazonaws.com/pypi/{}/simple/".format(ca_domain, ca_domain_owner, ca_region, ca_repository) in stdout | ||
| # assert "Installing collected packages: pyfiglet" in stdout | ||
| # assert "Successfully installed pyfiglet-0.8.post1" in stdout | ||
| # assert "Reporting training SUCCESS" in stdout | ||
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.
Please add a repository_arn sample in comment
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 second documentation link already has the format of the arn.
arn:${Partition}:codeartifact:${Region}:${Account}:repository/${DomainName}/${RepositoryName}Also, keep in mind, this is a private method, but am happy to add this above format for clarity if u think that the link is not enough
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.
Yes, pls add it. Thanks