From 37ddbf06b347aa7ff7e4f0aaeebcf805ea9a0469 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Mon, 9 Nov 2026 21:02:45 +0000 Subject: [PATCH 1/2] Upgrade to Python 3.12 base layer - Base image baseevalutionfunctionlayer:main-3.8 -> main-3.12 (AL2023: dnf findutils, PYTHONPATH, module-style CMD) - Python 3.12 dependency fixes where needed Co-Authored-By: Claude Opus 5.5 --- app/Dockerfile | 15 ++++++++++----- app/requirements.txt | 5 +---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index 8400b98..ade593a 100755 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,9 +1,13 @@ -# Base image that bundles AWS Lambda Python 3.8 image with some middleware functions -# FROM base-eval-tmp -FROM ghcr.io/lambda-feedback/baseevalutionfunctionlayer:main-3.8 +# Base image that bundles the AWS Lambda Python image with the lambda-feedback middleware (app.handler) +FROM ghcr.io/lambda-feedback/baseevalutionfunctionlayer:main-3.12 + +# The 3.12 image is Amazon Linux 2023, which doesn't ship `find` (used below) +RUN dnf install -y findutils && dnf clean all WORKDIR /app +ENV PYTHONPATH=/app + # Copy and install any packages/modules needed for your evaluation script. COPY requirements.txt . RUN pip3 install -r requirements.txt @@ -44,5 +48,6 @@ COPY docs/user.md ./app/docs/user.md RUN chmod 644 $(find . -type f) RUN chmod 755 $(find . -type d) -# The entrypoint for AWS is to invoke the handler function within the app package -CMD [ "/app/app.handler" ] +# The entrypoint for AWS is to invoke the handler function within the app package. +# Python 3.12's Lambda runtime imports this as a module name, so it can't be a path. +CMD [ "app.handler" ] diff --git a/app/requirements.txt b/app/requirements.txt index db4d68b..caa2116 100755 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -1,9 +1,6 @@ openai==0.28.0 python-dotenv==0.21.1 -typing==3.7.4.3 -numpy==1.24.2 -langchain==0.0.335 -streamlit==1.20.0 +numpy>=1.26 anthropic==0.18.1 mistralai==0.0.11 tabulate==0.9.0 From 9c5c21c7c438f6e05f0f6df827aaa14e83b08029 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Tue, 10 Nov 2026 11:19:24 +0000 Subject: [PATCH 2/2] Copy RiskAssessment.py into app/data, where evaluation.py imports it from Co-Authored-By: Claude Opus 5.5 --- app/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Dockerfile b/app/Dockerfile index ade593a..b8e36ea 100755 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -36,7 +36,7 @@ COPY prompts/PreventionClassificationWithoutContextOfOtherInputs.py ./app/prompt COPY prompts/MitigationClassificationWithoutContextOfOtherInputs.py ./app/prompts/ COPY prompts/NoInformationProvided.py ./app/prompts/ COPY prompts/SummarizeControlMeasureFeedback.py ./app/prompts/ -COPY data/RiskAssessment.py ./app/ +COPY data/RiskAssessment.py ./app/data/ COPY utils/LLMCaller.py ./app/utils/ COPY utils/RegexPatternMatcher.py ./app/utils/