From 7220ff9d8596f55bb15c4d4c725277e8643b142a Mon Sep 17 00:00:00 2001 From: atalman Date: Mon, 2 Oct 2023 11:27:27 -0700 Subject: [PATCH] Revert "Pin conda build images - fix nightly conda failures (#4582)" This reverts commit 389b0abb6213d509ec4380ebde9c0b584326a25e. Add ssh to linux job Add debug flag test test test test test test test test test test --- .../actions/setup-binary-builds/action.yml | 42 +++++-------------- .github/workflows/build_conda_linux.yml | 7 ++++ tools/scripts/generate_binary_build_matrix.py | 4 +- 3 files changed, 19 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup-binary-builds/action.yml b/.github/actions/setup-binary-builds/action.yml index 9b499d5165..e4231e02d3 100644 --- a/.github/actions/setup-binary-builds/action.yml +++ b/.github/actions/setup-binary-builds/action.yml @@ -109,38 +109,16 @@ runs: set -euxo pipefail CONDA_ENV="${RUNNER_TEMP}/conda_environment_${GITHUB_RUN_ID}" - if [[ "${PYTHON_VERSION}" = "3.11" ]]; then + 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 [[ "${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}" diff --git a/.github/workflows/build_conda_linux.yml b/.github/workflows/build_conda_linux.yml index 8ba94cc14f..29b40ab1e1 100644 --- a/.github/workflows/build_conda_linux.yml +++ b/.github/workflows/build_conda_linux.yml @@ -129,6 +129,13 @@ jobs: # shellcheck disable=SC1090 source "${BUILD_ENV_FILE}" + # Please note these are required changes to make sure our conda environment take precedence before + # any other environments https://github.com/conda-incubator/setup-miniconda#conda-incubatorsetup-miniconda + # such as test environment created by default. + export PATH=$CONDA_ENV/bin:$CONDA_ENV:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + export Python3_EXECUTABLE="${CONDA_ENV}" + ${CONDA_RUN} conda build \ -c defaults \ -c "${CUDATOOLKIT_CHANNEL}" \ diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index 9ce2aa8f15..540f9feab0 100644 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -128,10 +128,10 @@ def initialize_globals(channel: str): } mod.CONDA_CONTAINER_IMAGES = { **{ - gpu_arch: f"pytorch/conda-builder:cuda{gpu_arch}-941be28cb5c686dc41b7ea8681701e64192c3002" + gpu_arch: f"pytorch/conda-builder:cuda{gpu_arch}" for gpu_arch in mod.CUDA_ARCHES }, - "cpu": "pytorch/conda-builder:cpu-941be28cb5c686dc41b7ea8681701e64192c3002", + "cpu": "pytorch/conda-builder:cpu", } mod.LIBTORCH_CONTAINER_IMAGES: Dict[Tuple[str, str], str] = { **{