-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 883 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 883 Bytes
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
from public.ecr.aws/lambda/python:3.13 as app
# OS
env UV_COMPILE_BYTECODE=1
env UV_LINK_MODE=copy
## Configure for system level install
env UV_PROJECT_ENVIRONMENT=/var/lang/
## uv install
copy --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/
# App
workdir /app
## Build / deps
copy pyproject.toml hatch.toml readme.md uv.lock .
copy src/critic/version.py src/critic/version.py
run --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev --inexact
## Source files after the build for better caching/speed when deps haven't changed
copy src/critic src/critic
copy src/lambda_handler.py src
## App Env
env FLASK_DEBUG=0
# Lambda Entry Point
# The lamba runtime environment will use this dotted path as the entry point to our app when
# the lambda function is invoked. It must be a function, it doesn't handle class methods.
cmd ["lambda_handler.entry"]