-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·31 lines (24 loc) · 873 Bytes
/
Dockerfile
File metadata and controls
executable file
·31 lines (24 loc) · 873 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
ARG PYTHON_VERSION
# Base image is Python 3.8/3.9/3.10/3.11/3.12 provided by AWS Lambda in Docker Hub
FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
WORKDIR /app
# These are visible, the image is public so secrets would be accessible anyways
# We'd like these to be available if any evaluation function needs it...
# TODO: ~Find a better way to do this~
# TODO: We can probably use docker secrets, let's see...
ARG INVOKER_ID
ARG INVOKER_KEY
ARG INVOKER_REGION
ENV INVOKER_ID=${INVOKER_ID}
ENV INVOKER_KEY=${INVOKER_KEY}
ENV INVOKER_REGION=${INVOKER_REGION}
# Install backend dependencies
COPY requirements.txt base_requirements.txt
RUN pip3 install -r base_requirements.txt
# Copy the scripts
COPY __init__.py ./app/
COPY handler.py ./app/
COPY tests/*.py ./app/tests/
COPY tools/*.py ./app/tools/
COPY schemas/ ./app/schemas/
ENV SCHEMA_DIR=/app/app/schemas/