-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
50 lines (44 loc) · 982 Bytes
/
serverless.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
46
47
48
49
50
service: onnx-inference-lambda
provider:
name: aws
runtime: python3.7
memorySize: 3008
timeout: 10
tracing:
lambda: true
package:
individually: true
plugins:
- serverless-package-python-functions
- serverless-apigw-binary
custom:
pkgPyFuncs: # plugin configuration
buildDir: _build
useDocker: true
requirementsFile: 'requirements.txt'
globalRequirements:
- ./requirements.txt
#globalIncludes:
# - ./common_files
cleanup: false
apigwBinary:
types:
- 'image/jpeg'
- 'image/png'
layers:
Densenet121Layer:
path: densenet121
functions:
inference-function:
name: onnx-inference-${opt:stage}
events:
- http:
path: /predict
method: post
handler: handler.inference
layers:
- { Ref: Densenet121LayerLambdaLayer }
package:
include:
- inference-function
artifact: ${self:custom.pkgPyFuncs.buildDir}/onnx-inference-${opt:stage}.zip