Skip to content

Commit 7203a62

Browse files
committed
CI: drop defaults channel from conda installs to fix mixed-channel solve
The macOS conda env solve has been intermittently failing with LibMambaUnsatisfiableError because conda-env-ci.txt's `cmake=3.31.2` needs newer transitive deps from conda-forge (libzlib>=1.3.1, rhash>=1.4.5) than the miniconda base env's anaconda-defaults pulls in (zlib=1.2.13, rhash=1.4.3). The Voxtral metal e2e ffmpeg install hit the same class of conflict. A previous attempt added `--strict-channel-priority`, but libmamba on macOS emits `Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY` and falls into a deterministic failure on the rhash conflict — that flag is effectively unimplemented for this code path. `conda config --set channel_priority strict` would land in the same libmamba code path and additionally leak `~/.condarc` state across the persistent self-hosted macOS runners. `--override-channels` is implemented at the conda CLI layer (filters the channel list before the solver runs) rather than as a solver rule, so it works with libmamba. Dropping defaults is safe for these call sites: every package they install (cmake, ninja, libuv, llvm-openmp, pkg-config, ffmpeg, libstdcxx-ng, openblas) is first-class on conda- forge, and downstream pip-managed deps are unaffected. Patch all five mixed-channel `conda install` sites in the repo for consistency. Authored with Claude Code.
1 parent e84a418 commit 7203a62

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

.ci/docker/common/install_conda.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ install_python() {
3939

4040
# From https://github.com/pytorch/pytorch/blob/main/.ci/docker/common/install_conda.sh
4141
if [[ $(uname -m) == "aarch64" ]]; then
42-
conda_install "openblas==0.3.29=*openmp*" -c conda-forge
42+
conda_install "openblas==0.3.29=*openmp*" -c conda-forge --override-channels
4343
else
4444
conda_install mkl=2022.1.0 mkl-include=2022.1.0
4545
fi

.ci/scripts/setup-conda.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ set -ex
99

1010
install_conda() {
1111
pushd .ci/docker || return
12-
${CONDA_INSTALL} -c conda-forge -y --file conda-env-ci.txt
12+
# --override-channels excludes the anaconda defaults channel so the
13+
# solve doesn't have to reconcile defaults' older transitive deps
14+
# (e.g. zlib=1.2.13, rhash=1.4.3) with conda-forge's newer ones
15+
# required by cmake=3.31.2 (libzlib>=1.3.1, rhash>=1.4.5). Mixing
16+
# the two channels intermittently failed with LibMambaUnsatisfiable
17+
# Error; libmamba on macOS does not implement strict channel
18+
# priority, so the only deterministic fix is to drop defaults.
19+
${CONDA_INSTALL} -c conda-forge --override-channels -y --file conda-env-ci.txt
1320
popd || return
1421
}
1522

.ci/scripts/test_model_e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ fi
258258
if [ "$AUDIO_URL" != "" ]; then
259259
curl -L $AUDIO_URL -o ${MODEL_DIR}/$AUDIO_FILE
260260
elif [[ "$MODEL_NAME" == *whisper* ]] || [ "$MODEL_NAME" = "voxtral_realtime" ]; then
261-
conda install -y -c conda-forge "ffmpeg<8"
261+
conda install -y -c conda-forge --override-channels "ffmpeg<8"
262262
pip install datasets soundfile
263263
# We pushd'd into EXECUTORCH_ROOT above, so torch_pin is importable here.
264264
TORCHCODEC_PKG=$(python -c "from torch_pin import torchcodec_spec; print(torchcodec_spec())")

.github/workflows/cuda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
126126
# The Triton-compiled .so files in the CUDA backend require GLIBCXX_3.4.29
127127
# which the default system libstdc++ doesn't have. Install a newer one.
128-
conda install -y -c conda-forge 'libstdcxx-ng>=12'
128+
conda install -y -c conda-forge --override-channels 'libstdcxx-ng>=12'
129129
export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH
130130
131131
# Build ExecuTorch with CUDA support
@@ -433,7 +433,7 @@ jobs:
433433
# The embedded .so files in the CUDA blob require GLIBCXX_3.4.29
434434
# which the default conda libstdc++ doesn't have. Install a newer
435435
# libstdc++ from conda-forge and use it via LD_PRELOAD.
436-
conda install -y -c conda-forge 'libstdcxx-ng>=12'
436+
conda install -y -c conda-forge --override-channels 'libstdcxx-ng>=12'
437437
export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH
438438
# Verify the new libstdc++ has GLIBCXX_3.4.29
439439
strings /opt/conda/lib/libstdc++.so.6 | grep GLIBCXX_3.4.29 || {

0 commit comments

Comments
 (0)