Docker release build don't include build suffix in the release (#112046)

This build is used in release as far as I know. For release we don't need suffix.

Test in Release:
```
python3 .github/scripts/generate_pytorch_version.py
2.1.1+cpu
python3 .github/scripts/generate_pytorch_version.py --no-build-suffix
2.1.1
```

Test with nightly:
```
python3 .github/scripts/generate_pytorch_version.py --no-build-suffix
2.2.0.dev20231025
```

With suffix:
```
python3 .github/scripts/generate_pytorch_version.py
2.2.0.dev20231025+cpu
````
Pull Request resolved: https://github.com/pytorch/pytorch/pull/112046
Approved by: https://github.com/huydhn
This commit is contained in:
atalman 2023-10-25 19:40:01 +00:00 committed by PyTorch MergeBot
parent b54ab57522
commit 36b3e1789a

View file

@ -81,7 +81,7 @@ jobs:
# To get QEMU binaries in our PATH
echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}"
# Generate PyTorch version to use
echo "PYTORCH_VERSION=$(python3 .github/scripts/generate_pytorch_version.py)" >> "${GITHUB_ENV}"
echo "PYTORCH_VERSION=$(python3 .github/scripts/generate_pytorch_version.py --no-build-suffix)" >> "${GITHUB_ENV}"
- name: Setup nightly specific variables
if: ${{ github.event.ref == 'refs/heads/nightly' || startsWith(github.event.ref, 'refs/tags/ciflow/nightly/') }}
run: |