-
Notifications
You must be signed in to change notification settings - Fork 19
/
serverless.yml
39 lines (36 loc) · 938 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
service: ${env:SERVICE}
frameworkVersion: "3"
provider:
name: aws
deploymentMethod: direct
# REF: https://www.serverless.com/blog/container-support-for-lambda
ecr:
# In this section you can define images that will be built locally and uploaded to ECR
images:
appimage:
path: ./
file: Dockerfile
buildArgs:
MODEL: ${env:MODEL}
stage: dev
region: us-east-1
iam:
role:
statements:
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
Resource: "*"
functions:
embeddings:
image:
name: appimage
memorySize: ${env:MEMORY_SIZE}
environment:
MODEL: ${env:MODEL}
NORMALIZE_EMBEDDINGS: ${env:NORMALIZE_EMBEDDINGS}
VERBOSE: ${env:VERBOSE}
HF_HOME: /tmp/hf_home
timeout: 900
# https://www.serverless.com/framework/docs/providers/aws/guide/functions#lambda-function-urls
url: true