From 4b4c92fa8fc61e71413a70b6978ab180ab54db80 Mon Sep 17 00:00:00 2001 From: Severin Dicks <37635888+Intron7@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:07:39 +0100 Subject: [PATCH] added yaml for gpu_ci (#1359) * Set 30min timeout for GPU tests * added yaml for gpu_ci * fixes typo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * List pip packages too --------- Co-authored-by: Isaac Virshup Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .ci/gpu_ci.yml | 12 ++++++++++++ .github/workflows/test-gpu.yml | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 .ci/gpu_ci.yml diff --git a/.ci/gpu_ci.yml b/.ci/gpu_ci.yml new file mode 100644 index 000000000..9776ec3d5 --- /dev/null +++ b/.ci/gpu_ci.yml @@ -0,0 +1,12 @@ +name: cupy_env +channels: + - nvidia + - conda-forge +dependencies: + - python=3.12 + - cuda-version=11.8 + - cupy + - numba + - pytest + - pytest-cov + - pytest-xdist diff --git a/.github/workflows/test-gpu.yml b/.github/workflows/test-gpu.yml index 104396116..5d93f10d9 100644 --- a/.github/workflows/test-gpu.yml +++ b/.github/workflows/test-gpu.yml @@ -35,9 +35,14 @@ jobs: name: GPU Tests needs: check runs-on: "cirun-aws-gpu--${{ github.run_id }}" + # Setting a timeout of 30 minutes, as the AWS costs money + # At time of writing, a typical run takes about 5 minutes + timeout-minutes: 30 + defaults: run: shell: bash -el {0} + steps: - uses: actions/checkout@v3 with: @@ -49,14 +54,7 @@ jobs: - uses: mamba-org/setup-micromamba@v1 with: micromamba-version: "1.3.1-0" - environment-name: anndata-gpu-ci - create-args: >- - python=3.11 - cupy - numba - pytest - pytest-cov - pytest-xdist + environment-file: .ci/gpu_ci.yml init-shell: >- bash generate-run-shell: false @@ -64,8 +62,10 @@ jobs: - name: Install AnnData run: pip install .[dev,test,gpu] - - name: Mamba list - run: micromamba list + - name: Env list + run: | + micromamba list + pip list - name: Run test run: pytest -m gpu --cov --cov-report=xml --cov-context=test -n 4