Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -32,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/

Expand All @@ -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" ]
5 changes: 1 addition & 4 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading