Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'
Expand Down
Loading