From 652e080652202b301db6a09b376b9c3c79479f5a Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Fri, 23 Oct 2026 11:47:47 +0200 Subject: [PATCH] fix(ci): install CPU-only torch wheels in GitHub Actions The Linux CI jobs fail while installing the package: [Errno 122] Disk quota exceeded Errno 122 is EDQUOT, hit while unpacking the CUDA torch stack that `pip install -e .` resolves by default. torch alone is 554.6 MB and the accompanying nvidia-* wheels add another ~2.4 GB, which no longer fits the runner's quota. The failure occurs during "Installing build dependencies", i.e. the isolated PEP 517 build environment is already enough to exceed it on its own. The trigger is a runner image change, not a code change: * upstream 11_bernhard_dev, 2026-10-20, Image: ubuntu-24.04 -> success * same workflows, 2026-10-23, Image: ubuntu-26.04 -> failure Both resolve an identical wheel set (torch 2.14.1, 554.6 MB). The `ubuntu-latest` label began migrating to Ubuntu 26 on 2026-10-19 (actions/runner-images#14748), between those two runs. Both workflows already carry "Free up disk space" steps, so these jobs were running close to the limit before the migration. Fix: install CPU-only torch from download.pytorch.org, then build with --no-build-isolation so the build reuses it instead of resolving torch a second time. --no-build-isolation needs the build dependencies present up front, hence the explicit setuptools/wheel/numpy install; the `setuptools<81` bound matches the pin already in install_requires. This loses no coverage: BUILD_CUDA_EXT keys off CUDA_HOME/ROCM_HOME, which is unset on these runners, so the CUDA sources were never compiled here. tests/smoke_tests/Dockerfile already installs torch this way. macOS keeps the plain `pip install -e .` unchanged: its PyPI wheels are already CPU-only, and leaving it alone keeps the default PEP 517 build-isolation path under test somewhere in the matrix. --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++-------- .github/workflows/install.yml | 14 +++++++++++++- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 587fffa058..9705c44642 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,12 @@ jobs: PIP_NO_CACHE_DIR: 1 run: | sudo apt-get update && sudo apt-get install -y build-essential cmake - python -m pip install -U pip pytest - pip install -e . --no-cache-dir + python -m pip install -U pip "setuptools<81" wheel numpy pytest + # CPU-only torch: the CUDA stack no longer fits the runner's disk + # quota. --no-build-isolation then reuses it for the build instead + # of resolving a second copy. See tests/smoke_tests/Dockerfile. + pip install --index-url https://download.pytorch.org/whl/cpu torch + pip install -e . --no-build-isolation --no-cache-dir python setup.py build_ext --inplace --force - name: Unit tests @@ -70,8 +74,12 @@ jobs: PIP_NO_CACHE_DIR: 1 run: | sudo apt-get update && sudo apt-get install -y build-essential cmake xvfb libgl1-mesa-dev libegl1-mesa-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxxf86vm-dev - python -m pip install -U pip - pip install -e . --no-cache-dir + python -m pip install -U pip "setuptools<81" wheel numpy + # CPU-only torch: the CUDA stack no longer fits the runner's disk + # quota. --no-build-isolation then reuses it for the build instead + # of resolving a second copy. See tests/smoke_tests/Dockerfile. + pip install --index-url https://download.pytorch.org/whl/cpu torch + pip install -e . --no-build-isolation --no-cache-dir python setup.py build_ext --inplace --force - name: C drive tests @@ -103,8 +111,12 @@ jobs: PIP_NO_CACHE_DIR: 1 run: | sudo apt-get update && sudo apt-get install -y build-essential cmake - python -m pip install -U pip pytest jupytext nbclient ipykernel - pip install -e . --no-cache-dir + python -m pip install -U pip "setuptools<81" wheel numpy pytest jupytext nbclient ipykernel + # CPU-only torch: the CUDA stack no longer fits the runner's disk + # quota. --no-build-isolation then reuses it for the build instead + # of resolving a second copy. See tests/smoke_tests/Dockerfile. + pip install --index-url https://download.pytorch.org/whl/cpu torch + pip install -e . --no-build-isolation --no-cache-dir python setup.py build_ext --inplace --force - name: Run notebooks @@ -151,8 +163,12 @@ jobs: PIP_NO_CACHE_DIR: 1 run: | sudo apt-get update && sudo apt-get install -y build-essential cmake libgl1-mesa-dev libegl1-mesa-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxxf86vm-dev - python -m pip install -U pip - pip install -e . --no-cache-dir + python -m pip install -U pip "setuptools<81" wheel numpy + # CPU-only torch: the CUDA stack no longer fits the runner's disk + # quota. --no-build-isolation then reuses it for the build instead + # of resolving a second copy. See tests/smoke_tests/Dockerfile. + pip install --index-url https://download.pytorch.org/whl/cpu torch + pip install -e . --no-build-isolation --no-cache-dir python setup.py build_ext --inplace --force - name: Test simulator performance diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 7b5a5c4703..25bde9f831 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -38,7 +38,19 @@ jobs: sudo apt-get clean sudo rm -rf ~/.cache/pip /tmp/* /var/tmp/* - - name: Install pufferlib + - name: Install pufferlib (Linux) + if: runner.os == 'Linux' + run: | + python -m pip install -U pip "setuptools<81" wheel numpy + # CPU-only torch. The CUDA stack is ~3 GB of wheels and no longer + # fits the runner's disk quota; see the Install steps in ci.yml. + pip install --index-url https://download.pytorch.org/whl/cpu torch + pip install -e . --no-build-isolation + + - name: Install pufferlib (macOS) + if: runner.os != 'Linux' run: | python -m pip install -U pip + # Deliberately a plain install: macOS wheels are already CPU-only, so + # this keeps the default PEP 517 build-isolation path under test. pip install -e .