forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.yaml
64 lines (59 loc) · 1.74 KB
/
function.yaml
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
64
metadata:
name: pth-saic-vul-fbrs
namespace: cvat
annotations:
name: f-BRS
version: 2
type: interactor
spec:
framework: pytorch
min_pos_points: 1
min_neg_points: 0
animated_gif: https://raw.githubusercontent.com/cvat-ai/cvat/0fbb19ae3846a017853d52e187f0ce149adced7d/site/content/en/images/fbrs_example.gif
help_message: The interactor allows to get a mask for an object using positive points, and negative points
spec:
description: f-BRS interactive segmentation
runtime: 'python:3.6'
handler: main:handler
eventTimeout: 30s
env:
- name: PYTHONPATH
value: /opt/nuclio/fbrs
build:
image: cvat.pth.saic-vul.fbrs
baseImage: python:3.6.11
directives:
preCopy:
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: git clone https://github.com/saic-vul/fbrs_interactive_segmentation.git fbrs
- kind: WORKDIR
value: /opt/nuclio/fbrs
- kind: RUN
value: pip3 install gdown
- kind: ENV
value: fileid=1Z9dQtpWVTobEdmUBntpUU0pJl-pEXUwR
- kind: ENV
value: filename=resnet101_dh256_sbd.pth
- kind: RUN
value: gdown https://drive.google.com/uc?id=${fileid} -O ${filename}
- kind: RUN
value: apt update && apt install -y libgl1-mesa-glx
- kind: RUN
value: pip3 install -r requirements.txt
- kind: WORKDIR
value: /opt/nuclio
triggers:
myHttpTrigger:
maxWorkers: 2
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume