From 4bd0d338a14964632888f881af26b16f78ca4cac Mon Sep 17 00:00:00 2001 From: Sally Seok <49303563+sallyseok@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:57:33 -0800 Subject: [PATCH] [Bug fix] Add new lastsha tag to front of list instead of last (#4495) * 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') --- src/patch_helper.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/patch_helper.py b/src/patch_helper.py index fcca27232dcf..f6c02a56f5f7 100644 --- a/src/patch_helper.py +++ b/src/patch_helper.py @@ -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 @@ -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):