-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.yaml
54 lines (49 loc) · 1.21 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
metadata:
name: detr-5
namespace: cvat
annotations:
name: DETR-5
type: detector
framework: pytorch
spec: |
[
{ "id": 1 , "name": "car" },
{ "id": 2 , "name": "bus" },
{ "id": 3 , "name": "truck" },
{ "id": 4 , "name": "motorcycle" },
{ "id": 5 , "name": "pedestrian" }
]
spec:
description: DETR
runtime: 'python:3.8'
handler: main:handler
eventTimeout: 30s
build:
image: cvat/detr
baseImage: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime
directives:
preCopy:
- kind: USER
value: root
- kind: RUN
value: apt-get update -qq && apt-get install -y git vim libgtk2.0-dev && rm -rf /var/cache/apk/*
- kind: RUN
value: pip --no-cache-dir install packaging scipy
- kind: WORKDIR
value: /opt/nuclio
triggers:
myHttpTrigger:
maxWorkers: 1
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
resources:
limits:
nvidia.com/gpu: 1
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume