From 64e678488e440c326a78c5d3282e3046e16ffe73 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Fri, 21 Jun 2024 16:58:50 -0400 Subject: [PATCH] Cherry-Pick of Add ability to switch channels during conda build #1880 (#1881) --- conda/build_pytorch.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conda/build_pytorch.sh b/conda/build_pytorch.sh index 9f0649c50..9132b4058 100755 --- a/conda/build_pytorch.sh +++ b/conda/build_pytorch.sh @@ -413,7 +413,13 @@ for py_ver in "${DESIRED_PYTHON[@]}"; do else local_channel="$(pwd)/$output_folder" fi - conda install -y -c "file://$local_channel" pytorch==$PYTORCH_BUILD_VERSION -c pytorch -c numba/label/dev -c pytorch-nightly -c nvidia + + CONDA_CHANNEL="pytorch-test" + if [[ -n "$OVERRIDE_PACKAGE_VERSION" && "$OVERRIDE_PACKAGE_VERSION" =~ .*dev.* ]]; then + CONDA_CHANNEL="pytorch-nightly" + fi + + conda install -y -c "file://$local_channel" pytorch==$PYTORCH_BUILD_VERSION -c pytorch -c numba/label/dev -c $CONDA_CHANNEL -c nvidia echo "$(date) :: Running tests" pushd "$pytorch_rootdir"