File size: 1,578 Bytes
2774c5b ee76d12 2774c5b |
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 |
metadata:
name: custom-model-yolov8
namespace: cvat
annotations:
name: custom-model-yolov8
type: detector
framework: pytorch
# change this accordingly to your model output/classes
spec: |
[
{"id": 0, "name": "bicycle_rider"}
]
spec:
description: custom-model-yolov8
runtime: 'python:3.9'
handler: main:handler
eventTimeout: 30s
build:
image: custom-model-yolov8
baseImage: ubuntu:22.04
directives:
preCopy:
- kind: ENV
value: DEBIAN_FRONTEND=noninteractive
- kind: RUN
value: apt-get update && apt-get -y install curl git python3 python3-pip
- kind: RUN
value: apt-get -y install libgl1-mesa-glx libglib2.0-dev
- kind: WORKDIR
value: /opt/nuclio
#
# make sure that for the next step (at least) the ultralytics package version
# is compatible to that of the the ultralytics package used to train the custom model
- kind: RUN
value: pip3 install ultralytics==8.0.114 opencv-python==4.7.0.72 numpy==1.24.3
#
- kind: RUN
value: ln -s /usr/bin/pip3 /usr/local/bin/pip
- kind: RUN
value: ln -s /usr/bin/python3 /usr/local/bin/python
triggers:
myHttpTrigger:
maxWorkers: 1
kind: 'http'
workerAvailabilityTimeoutMilliseconds: 10000
attributes:
maxRequestBodySize: 33554432 # 32MB
platform:
attributes:
restartPolicy:
name: always
maximumRetryCount: 3
mountMode: volume
|