diff --git a/docker/build_upload_release.py b/docker/build_upload_release.py index 8def7bb217..44c3812297 100644 --- a/docker/build_upload_release.py +++ b/docker/build_upload_release.py @@ -56,7 +56,7 @@ f"{organization}/torchserve:{check_ts_version()}-cpu", f"{organization}/torchserve:{check_ts_version()}-gpu", ]: - os.system(f"docker push {image}") + try_and_handle(f"docker push {image}", dry_run) # Cleanup built images if args.cleanup: diff --git a/kubernetes/kserve/build_upload_release.py b/kubernetes/kserve/build_upload_release.py index d10ae8533f..55183c7a03 100644 --- a/kubernetes/kserve/build_upload_release.py +++ b/kubernetes/kserve/build_upload_release.py @@ -43,7 +43,7 @@ f"{organization}/torchserve-kfs:{check_ts_version()}", f"{organization}/torchserve-kfs:{check_ts_version()}-gpu", ]: - os.system(f"docker push {image}") + try_and_handle(f"docker push {image}", dry_run) # Cleanup built images if args.cleanup: