diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89df162..307986d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: run: | # Create a hash from the environment file and PyTorch CPU install string ENV_HASH=$(sha256sum toolbox_env_conda.yml | cut -d' ' -f1) - PYTORCH_SPEC="pytorch-cpuonly" + PYTORCH_SPEC="pip-torch-torchvision-cpu-whl" CACHE_KEY="micromamba-${{ runner.os }}-${ENV_HASH}-${PYTORCH_SPEC}" echo "key=${CACHE_KEY}" >> $GITHUB_OUTPUT @@ -54,8 +54,14 @@ jobs: - name: Install CPU-only PyTorch and dependencies if: steps.cache-restore.outputs.cache-hit != 'true' run: | - ~/micromamba-bin/micromamba install -n tbe -y pytorch cpuonly -c pytorch -c conda-forge - pip install esm + # Avoid a second micromamba/libmamba solve mixing pytorch + conda-forge on an + # already-large env (can abort with libsolv solver_addrule assertion, exit 134). + # CPU wheels from PyTorch are the usual CI approach. Install torchvision from the + # same index as torch so C++/dispatch ops (e.g. torchvision::nms) match conda-forge + # transformers alone pulls torchvision that can mismatch a pip-only torch build. + ~/micromamba-bin/micromamba run -n tbe python -m pip install --upgrade pip + ~/micromamba-bin/micromamba run -n tbe python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu + ~/micromamba-bin/micromamba run -n tbe python -m pip install esm - name: Save micromamba environment cache if: steps.cache-restore.outputs.cache-hit != 'true'