diff --git a/.circleci/config.yml b/.circleci/config.yml index f090ff539c4..83e7ebd0f49 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -312,7 +312,7 @@ jobs: conda activate base conda install -yq conda-build "conda-package-handling!=1.5.0" # cudatoolkit >= 11 isn't available for windows in the nvidia channel - if [[ "${CU_VERSION}" =~ "cu11*" ]]; then + if [[ "${CU_VERSION}" =~ cu11.* ]]; then export CONDA_CHANNEL_FLAGS="-c conda-forge" fi packaging/build_conda.sh diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 18a23c2e639..19539785e9b 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -312,7 +312,7 @@ jobs: conda activate base conda install -yq conda-build "conda-package-handling!=1.5.0" # cudatoolkit >= 11 isn't available for windows in the nvidia channel - if [[ "${CU_VERSION}" =~ "cu11*" ]]; then + if [[ "${CU_VERSION}" =~ cu11.* ]]; then export CONDA_CHANNEL_FLAGS="-c conda-forge" fi packaging/build_conda.sh diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 88cb536f8e8..dfde11b707a 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -247,7 +247,7 @@ setup_pip_pytorch_version() { # You MUST have populated PYTORCH_VERSION_SUFFIX before hand. setup_conda_pytorch_constraint() { if [[ -z "$PYTORCH_VERSION" ]]; then - export CONDA_CHANNEL_FLAGS="-c pytorch-nightly -c pytorch" + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly -c pytorch" export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | \ python -c "import os, sys, json, re; cuver = os.environ.get('CU_VERSION'); \ cuver_1 = cuver.replace('cu', 'cuda') if cuver != 'cpu' else cuver; \ @@ -262,7 +262,7 @@ setup_conda_pytorch_constraint() { exit 1 fi else - export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-${UPLOAD_CHANNEL}" + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-${UPLOAD_CHANNEL}" fi if [[ "$CU_VERSION" == cpu ]]; then export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}"