-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
45 lines (41 loc) · 1.29 KB
/
.gitlab-ci.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
image: "jjanzic/docker-python3-opencv"
stages:
- build
- run
- evaluate
build_project:
stage: build
script:
- python -m venv venv
- source venv/bin/activate
- apt-get update && apt-get install libgl1 -y # For opencv
- pip install --upgrade pip
- pip install -r requirements.txt
- echo "Installed everything!"
artifacts:
paths:
- venv/
run_main:
stage: run
script:
- source venv/bin/activate
- apt-get update && apt-get install libgl1 -y
- echo "Running main!"
# - input_file="./dataset/pipeline/shorterVideo.avi" # TODO: Comment this line and
- input_file="./dataset/trainingvideo.avi" # TODO: Uncomment this line
- python3 main.py --file_path $input_file --output_path ./Output.csv
dependencies:
- build_project
artifacts:
paths:
- venv/
- Output.csv
test_percentage:
stage: evaluate
script:
- source venv/bin/activate
- test_output=$(python3 evaluation.py --file_path ./Output.csv --ground_truth_path ./dataset/groundTruth.csv | grep -e "Score of Category I & II" | cut -c30-)
- if [ -n "$test_output" ] && (( $(echo "$test_output" | awk '{if ($1 < 0.4) print 1; else print 0}') )); then echo "Test score is less than 0.4"; exit 1; fi
dependencies:
- run_main
allow_failure: true