-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 2.28 KB
/
pytest.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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Run Tests
on: [push]
jobs:
pytest:
runs-on: [self-hosted, gpu]
steps:
- uses: actions/checkout@v2
- name: checkout | cleanup
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
docker stop yolov5_trainer_node_github_action | echo "Nothing to do. No container running."
- name: pre-connect to nvidia container
run: |
docker run -d -it --rm nvcr.io/nvidia/pytorch:23.07-py3 echo "I have to be startet to authenticate against nvcr.io"
- name: build
if: github.ref != 'refs/heads/release'
run: |
cd trainer
./docker.sh b test_latest
- name: buildnocaches
if: github.ref == 'refs/heads/release'
run: |
cd trainer
./docker.sh bnc test_latest
- name: run
run: |
docker run -d -it --rm -v /home/zauberzeug/data:/data -h n6 -e LOOP_HOST=$LOOP_HOST -e LOOP_USERNAME=$LOOP_USERNAME -e LOOP_PASSWORD=$LOOP_PASSWORD -e YOLOV5_MODE=DETECTION --name yolov5_trainer_node_github_action --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all --gpus all --ipc host zauberzeug/yolov5-trainer:latest
- name: tests
run: |
docker exec yolov5_trainer_node_github_action pytest -vv
- name: publish
if: github.ref == 'refs/heads/release'
run: |
cd trainer
./docker.sh p test_latest
- name: cleanup
if: always() # also execute when pytest fails
run: |
docker stop yolov5_trainer_node_github_action | echo "Nothing to do. No container running."
slack:
needs:
- pytest
if: always() # also execute when pytest fails
runs-on: ubuntu-latest
steps:
- name: Determine if we need to notify
uses: Jimdo/should-i-notify-action@main
id: should_notify
with:
needs_context: ${{ toJson(needs) }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Slack workflow notification
if: steps.should_notify.outputs.should_send_message == 'yes'
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{ secrets.GIT_HUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_DEEPLEARNING_CI_WEBHOOK }}
channel: "deeplearning-ci"
name: "yolo v5 trainer"