Skip to content

Commit ec82e01

Browse files
committed
Concurrency on custom nvidia runners
1 parent 8b4edba commit ec82e01

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/nvidia_workflow.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,27 @@ on:
1515
required: false
1616
type: string
1717

18+
concurrency:
19+
group: nvidia-workflow-global
20+
cancel-in-progress: false
21+
1822
run-name: 'NVIDIA Job - ${{ github.event.inputs.run_id }}'
1923

2024
jobs:
25+
select-runner:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
runner: ${{ steps.pick.outputs.runner }}
29+
steps:
30+
- id: pick
31+
run: |
32+
runners=("b200-02-gpu0" "b200-02-gpu1" "b200-02-gpu2" "b200-02-gpu3" "b200-02-gpu4" "b200-02-gpu5" "b200-02-gpu6" "b200-02-gpu7")
33+
index=$(( ${{ github.run_number }} % 8 ))
34+
echo "runner=${runners[$index]}" >> $GITHUB_OUTPUT
35+
2136
run:
22-
runs-on: [nvidia-docker-b200-8-x86-64]
37+
needs: select-runner
38+
runs-on: [self-hosted, Linux, X64, nvidia-docker-b200-8-x86-64, "${{ needs.select-runner.outputs.runner }}"]
2339
timeout-minutes: 10
2440
steps:
2541
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)