-
Notifications
You must be signed in to change notification settings - Fork 75
50 lines (41 loc) · 1.4 KB
/
gpuci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "GPU CI/CD"
on:
pull_request:
branches:
- 'main'
- '[rv][0-9].[0-9].[0-9]'
- '[rv][0-9].[0-9].[0-9]rc[0-9]'
types: [ labeled ]
jobs:
build-container:
if: ${{ github.event.label.name == 'gpuci' }}
uses: ./.github/workflows/_build_container.yml
run-gpu-tests:
needs: build-container
runs-on: self-hosted
if: ${{ github.event.label.name == 'gpuci' }}
steps:
- name: Remove existing container if it exists
run: |
if [ "$(docker ps -aq -f name=nemo-curator-container)" ]; then
docker rm -f nemo-curator-container
fi
- name: Run Docker container with Python 3.10
run: |
docker run --gpus all --runtime=nvidia --name nemo-curator-container -d nemoci.azurecr.io/nemo_curator_container:${{ github.run_id }} bash -c "sleep infinity"
- name: Check environment
run: |
whoami
docker exec nemo-curator-container nvidia-smi
docker exec nemo-curator-container pytest --markers
docker exec nemo-curator-container pwd
docker exec nemo-curator-container ls -la
- name: Verify installations
run: |
docker exec nemo-curator-container pip list
- name: Run PyTests with GPU mark
run: |
docker exec nemo-curator-container pytest -m gpu
- name: Cleanup
run: |
docker stop nemo-curator-container && docker rm nemo-curator-container