Binary upload checksum (#144887)

Equivalent to https://github.com/pytorch/test-infra/pull/6172 but for pytorch
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144887
Approved by: https://github.com/atalman
This commit is contained in:
Catherine Lee
2025-01-31 17:51:27 +00:00
committed by PyTorch MergeBot
parent d0748566b4
commit 67ed47d886

View File

@ -58,7 +58,9 @@ s3_upload() {
for pkg in ${PKG_DIR}/*.${extension}; do
(
set -x
${AWS_S3_CP} --no-progress --acl public-read "${pkg}" "${s3_upload_dir}"
shm_id=$(sha256sum "${pkg}" | awk '{print $1}')
${AWS_S3_CP} --no-progress --acl public-read "${pkg}" "${s3_upload_dir}" \
--metadata "checksum-sha256=${shm_id}"
)
done
)