Skip to content

Commit 31f7dbd

Browse files
committed
trying gpu tests with common image
Signed-off-by: Peter St. John <pstjohn@nvidia.com>
1 parent 60adf79 commit 31f7dbd

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/bionemo-recipes.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ jobs:
4444
recipes/**
4545
4646
- id: set-dirs
47+
# TODO: add models to the list of dirs
4748
run: |
48-
DIRS=$(ls -d recipes/*/ models/*/ | jq -R -s -c 'split("\n")[:-1]')
49+
DIRS=$(ls -d recipes/*/ | jq -R -s -c 'split("\n")[:-1]')
4950
echo "dirs=$DIRS" >> $GITHUB_OUTPUT
5051
- name: Show output
5152
run: |
@@ -55,13 +56,31 @@ jobs:
5556

5657
per-folder-test:
5758
needs: changed-dirs
58-
runs-on: ubuntu-latest
59+
runs-on: linux-amd64-gpu-l4-latest-1
60+
container:
61+
image: nvcr.io/nvidia/pytorch:25.06-py3
5962
strategy:
6063
matrix:
6164
dir: ${{ fromJson(needs.changed-dirs.outputs.dirs) }}
6265

6366
steps:
64-
- name: Run tests
67+
- name: Checkout repository
6568
if: contains(needs.changed-dirs.outputs.all_changed_files, matrix.dir)
66-
run: |
67-
echo "Running tests for ${{ matrix.dir }}"
69+
uses: actions/checkout@v4
70+
with:
71+
sparse-checkout: '${{ matrix.dir }}'
72+
sparse-checkout-cone-mode: false
73+
74+
- run: |
75+
shopt -s dotglob
76+
mv ${matrix.dir}/* .
77+
rm -rf ${matrix.dir}
78+
79+
- name: Install uv
80+
uses: astral-sh/setup-uv@v6
81+
82+
- name: Install dependencies
83+
run: uv pip install -r requirements.txt
84+
85+
- name: Run tests
86+
run: pytest -v .

0 commit comments

Comments
 (0)