From f58abb359d5359398d87e487232e083a929db6cc Mon Sep 17 00:00:00 2001 From: Henry Leung Date: Mon, 2 Sep 2024 23:30:40 -0400 Subject: [PATCH] install pytorch cpu build if no nvidia-smi command --- .github/workflows/ci_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index b1855bfd..9b90c5e2 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -32,7 +32,7 @@ jobs: sudo apt install graphviz pip install -r requirements.txt pip install -r requirements-dev.txt - pip install ${{ matrix.BACKEND }}~=${{ matrix.BACKEND_VER }} + if [ -x "$(command -v nvidia-smi)" ] || [ "${BACKEND}" == "tensorflow" ]; then pip install ${{ matrix.BACKEND }}~=${{ matrix.BACKEND_VER }}; else pip install torch~=${{ matrix.BACKEND_VER }} --index-url https://download.pytorch.org/whl/cpu; fi pip install . - name: Cache test data uses: actions/cache@v4