From 875ca5ce4e3f396b5da21db24b817fd65895e801 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Thu, 12 Oct 2023 11:55:14 -0400 Subject: [PATCH] Restore special case for python 3.11 in setup-binary-builds. Fix tensorrt (#4631) Follow up on https://github.com/pytorch/test-infra/pull/4606 Causes this failure: https://github.com/pytorch/TensorRT/actions/runs/6486546804 --- .../actions/setup-binary-builds/action.yml | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/actions/setup-binary-builds/action.yml b/.github/actions/setup-binary-builds/action.yml index e4231e02d3..72d96fca78 100644 --- a/.github/actions/setup-binary-builds/action.yml +++ b/.github/actions/setup-binary-builds/action.yml @@ -109,16 +109,39 @@ runs: set -euxo pipefail CONDA_ENV="${RUNNER_TEMP}/conda_environment_${GITHUB_RUN_ID}" - conda create \ - --yes --quiet \ - --prefix "${CONDA_ENV}" \ - "python=${PYTHON_VERSION}" \ - cmake=3.22 \ - conda-build=3.21 \ - ninja=1.10 \ - pkg-config=0.29 \ - wheel=0.37 + if [[ "${PYTHON_VERSION}" = "3.11" ]]; then + if [[ "${PACKAGE_TYPE:-}" == "conda" ]]; then + conda create \ + --yes --quiet \ + --prefix "${CONDA_ENV}" \ + "python=3.8" \ + cmake=3.22 \ + conda-build=3.21 \ + ninja=1.10 \ + pkg-config=0.29 \ + wheel=0.37 + else + conda create \ + --yes --quiet \ + --prefix "${CONDA_ENV}" \ + "python=${PYTHON_VERSION}" \ + cmake=3.22 \ + ninja=1.10 \ + pkg-config=0.29 \ + wheel=0.37 + fi + else + conda create \ + --yes --quiet \ + --prefix "${CONDA_ENV}" \ + "python=${PYTHON_VERSION}" \ + cmake=3.22 \ + conda-build=3.21 \ + ninja=1.10 \ + pkg-config=0.29 \ + wheel=0.37 + fi echo "CONDA_ENV=${CONDA_ENV}" >> "${GITHUB_ENV}" echo "CONDA_RUN=conda run -p ${CONDA_ENV}" >> "${GITHUB_ENV}"