Install CPU-only PyTorch before requirements.txt on Linux

The previous ordering let requirements.txt pull CUDA-enabled torch
with all nvidia deps first, then the CPU override only swapped the
torch wheel while leaving ~3GB of nvidia packages installed.
This commit is contained in:
Jamie Pine
2026-03-14 00:55:43 -07:00
parent b915825165
commit 942dabbcac
+5 -5
View File
@@ -55,17 +55,17 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install CPU-only PyTorch (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r backend/requirements.txt
- name: Install CPU-only PyTorch (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu --force-reinstall --no-deps
- name: Install MLX dependencies (Apple Silicon only)
if: matrix.backend == 'mlx'
run: |