Skip to content

Commit

Permalink
[Bug fix] Add new lastsha tag to front of list instead of last (#4495)
Browse files Browse the repository at this point in the history
* Add new tag to front of list instead last

* Update ['dlc_developer_config.toml']

dlc_developer_config.toml:
{   'build': {   'build_frameworks': ['pytorch'],
                 'build_inference': True,
                 'build_training': False},
    'buildspec_override': {   'dlc-pr-pytorch-inference': 'pytorch/inference/buildspec.yml'},
    'dev': {   'arm64_mode': False,
               'deep_canary_mode': False,
               'graviton_mode': False,
               'neuronx_mode': False},
    'test': {   'ec2_tests': True,
                'ecs_tests': True,
                'eks_tests': True,
                'sagemaker_local_tests': True,
                'sagemaker_remote_tests': True,
                'sanity_tests': True,
                'security_tests': True}}

* Update ['dlc_developer_config.toml']

dlc_developer_config.toml:
{   'build': {   'build_frameworks': ['pytorch'],
                 'build_inference': False,
                 'build_training': True},
    'buildspec_override': {   'dlc-pr-pytorch-training': 'pytorch/training/buildspec.yml'},
    'dev': {   'arm64_mode': False,
               'deep_canary_mode': False,
               'graviton_mode': False,
               'neuronx_mode': False},
    'test': {   'ec2_tests': True,
                'ecs_tests': True,
                'eks_tests': True,
                'sagemaker_local_tests': True,
                'sagemaker_remote_tests': True,
                'sanity_tests': True,
                'security_tests': True}}

* print versions; test inference

* debugging

* debugging

* try installing boto3 without pin

* cleanup and final testing

* show pip install test/requirements.txt output

* move pip reinstall

* final testing

* Restore ['dlc_developer_config.toml']

dlc_developer_config.toml:
('Restore to '
 'https://raw.githubusercontent.com/aws/deep-learning-containers/master/dlc_developer_config.toml')
  • Loading branch information
sallyseok authored Jan 17, 2025
1 parent 9efa748 commit 4bd0d33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/patch_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def conduct_autopatch_build_setup(pre_push_image_object: DockerImage, download_p
# add latest released image SHA as an additional tag
datetime_str = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
sha_after_colon = latest_released_image_sha.split(":")[1]
pre_push_image_object.additional_tags.append(f"lastsha-{datetime_str}-{sha_after_colon}")
pre_push_image_object.additional_tags.insert(0, f"lastsha-{datetime_str}-{sha_after_colon}")

return constants.SUCCESS

Expand All @@ -303,8 +303,12 @@ def initiate_multithreaded_autopatch_prep(PRE_PUSH_STAGE_IMAGES, make_dummy_boto
"""
run(
f"""pip install -r {os.path.join(os.sep, get_cloned_folder_path(), "test", "requirements.txt")}""",
hide=True,
hide=False,
)
# temporary workaround for breaking boto3 version
run("pip uninstall -y boto3 botocore s3transfer")
run("pip install boto3==1.35.75") # minimum required version for sagemaker dependency currently

folder_path_outside_clone = os.path.join(os.sep, *get_cloned_folder_path().split(os.sep)[:-1])
download_path = os.path.join(os.sep, folder_path_outside_clone, "patch-dlc")
if not os.path.exists(download_path):
Expand Down

0 comments on commit 4bd0d33

Please sign in to comment.