forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.yaml
67 lines (62 loc) · 2.31 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
65
66
67
metadata:
name: pth-foolwood-siammask
namespace: cvat
annotations:
name: SiamMask
type: tracker
spec:
framework: pytorch
spec:
description: Fast Online Object Tracking and Segmentation
runtime: 'python:3.6'
handler: main:handler
eventTimeout: 30s
env:
- name: PYTHONPATH
value: /opt/nuclio/SiamMask:/opt/nuclio/SiamMask/experiments/siammask_sharp
build:
image: cvat.pth.foolwood.siammask
baseImage: ubuntu:20.04
directives:
preCopy:
- kind: ENV
value: PATH="/root/miniconda3/bin:${PATH}"
- kind: ARG
value: PATH="/root/miniconda3/bin:${PATH}"
- kind: RUN
value: apt update && apt install -y --no-install-recommends wget git ca-certificates libglib2.0-0 libsm6 libxrender1 libxext6 && rm -rf /var/lib/apt/lists/*
- kind: RUN
value: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh &&
chmod +x Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh -b &&
rm -f Miniconda3-latest-Linux-x86_64.sh
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: conda create -y -n siammask python=3.6
- kind: SHELL
value: '["conda", "run", "-n", "siammask", "/bin/bash", "-c"]'
- kind: RUN
value: git clone https://github.com/foolwood/SiamMask.git
- kind: RUN
value: pip install Cython==0.29.4 colorama==0.3.9 numpy==1.15.4 requests==2.21.0 fire==0.1.3 matplotlib==2.2.3 numba==0.39.0 scipy==1.1.0 h5py==2.8.0 pandas==0.23.4 tqdm==4.29.1 tensorboardX==1.6 opencv_python==3.4.3.18 torch==1.9.0 torchvision==0.2.1 jsonpickle
- kind: RUN
value: conda install -y gcc_linux-64
- kind: RUN
value: cd SiamMask && bash make.sh && cd -
- kind: RUN
value: wget -P SiamMask/experiments/siammask_sharp http://www.robots.ox.ac.uk/~qwang/SiamMask_DAVIS.pth
- kind: ENTRYPOINT
value: '["conda", "run", "-n", "siammask"]'
triggers:
myHttpTrigger:
maxWorkers: 2
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume