diff --git a/.github/scripts/build-linux-release-artifacts.sh b/.github/scripts/build-linux-release-artifacts.sh index b53d817aa1..bb8f632c8f 100644 --- a/.github/scripts/build-linux-release-artifacts.sh +++ b/.github/scripts/build-linux-release-artifacts.sh @@ -55,18 +55,16 @@ libtorchtrt() { PY_NAME=python${PYTHON_VERSION} PY_DIR=/opt/python/${PY_BUILD_CODE} - python -m pip install -r ${PROJECT_DIR}/py/requirements.txt - - TORCH_VERSION=$(python -c "from torch import __version__;print(__version__.split('+')[0])") + #python -m pip install -r ${PROJECT_DIR}/py/requirements.txt if [[ '${pre_cxx11_abi}' == 'true' ]]; then bazel build //:libtorchtrt --config pre_cxx11_abi --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz \ - ${PROJECT_DIR}/dist/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-tensorrt${TRT_VERSION}-cuda${CU_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz + ${PROJECT_DIR}/dist/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-tensorrt${TRT_VERSION}-cuda${CU_VERSION}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz else bazel build //:libtorchtrt --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz \ - ${PROJECT_DIR}/dist/libtorchtrt-${TORCHTRT_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz + ${PROJECT_DIR}/dist/libtorchtrt-${TORCHTRT_VERSION}-tensorrt${TRT_VERSION}-cuda${CU_VERSION}-libtorch${PYTORCH_VERSION}-x86_64-linux.tar.gz fi } diff --git a/.github/workflows/linux-release-artifacts.yml b/.github/workflows/linux-release-artifacts.yml index f79ccb5aeb..de7b869d4a 100644 --- a/.github/workflows/linux-release-artifacts.yml +++ b/.github/workflows/linux-release-artifacts.yml @@ -100,6 +100,12 @@ jobs: with: github-secret: ${{ github.token }} - uses: ./test-infra/.github/actions/set-channel + - name: Set PYTORCH_VERSION + if: ${{ env.CHANNEL == 'test' }} + run: | + # When building RC, set the version to be the current candidate version, + # otherwise, leave it alone so nightly will pick up the latest + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds with: repository: ${{ inputs.repository }}