Skip to content

Commit 4bd0d33

Browse files
authored
[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')
1 parent 9efa748 commit 4bd0d33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/patch_helper.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def conduct_autopatch_build_setup(pre_push_image_object: DockerImage, download_p
288288
# add latest released image SHA as an additional tag
289289
datetime_str = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
290290
sha_after_colon = latest_released_image_sha.split(":")[1]
291-
pre_push_image_object.additional_tags.append(f"lastsha-{datetime_str}-{sha_after_colon}")
291+
pre_push_image_object.additional_tags.insert(0, f"lastsha-{datetime_str}-{sha_after_colon}")
292292

293293
return constants.SUCCESS
294294

@@ -303,8 +303,12 @@ def initiate_multithreaded_autopatch_prep(PRE_PUSH_STAGE_IMAGES, make_dummy_boto
303303
"""
304304
run(
305305
f"""pip install -r {os.path.join(os.sep, get_cloned_folder_path(), "test", "requirements.txt")}""",
306-
hide=True,
306+
hide=False,
307307
)
308+
# temporary workaround for breaking boto3 version
309+
run("pip uninstall -y boto3 botocore s3transfer")
310+
run("pip install boto3==1.35.75") # minimum required version for sagemaker dependency currently
311+
308312
folder_path_outside_clone = os.path.join(os.sep, *get_cloned_folder_path().split(os.sep)[:-1])
309313
download_path = os.path.join(os.sep, folder_path_outside_clone, "patch-dlc")
310314
if not os.path.exists(download_path):

0 commit comments

Comments
 (0)