From 404003d26b7807a45de4ac15074d07daada0daaa Mon Sep 17 00:00:00 2001 From: Andreas Pfurtscheller <1051396+aplr@users.noreply.github.com> Date: Fri, 15 Mar 2024 22:38:22 +0000 Subject: [PATCH 1/2] fix task root --- Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index afe1b20..080f696 100755 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,6 @@ ARG PYTHON_VERSION # Base image is Python 3.8 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~ @@ -18,14 +16,14 @@ 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 requirements.txt ${LAMBDA_TASK_ROOT}/app/base_requirements.txt +RUN pip3 install -r ${LAMBDA_TASK_ROOT}/app/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 __init__.py ${LAMBDA_TASK_ROOT}/app/ +COPY handler.py ${LAMBDA_TASK_ROOT}/app/ +COPY tests/*.py ${LAMBDA_TASK_ROOT}/app/tests/ +COPY tools/*.py ${LAMBDA_TASK_ROOT}/app/tools/ # Request-response-schemas repo/branch to use for validation ENV SCHEMAS_URL=https://raw.githubusercontent.com/lambda-feedback/request-response-schemas/master From 3d76c93f01c1c6df862d95fb8ec728c815183604 Mon Sep 17 00:00:00 2001 From: Andreas Pfurtscheller <1051396+aplr@users.noreply.github.com> Date: Fri, 15 Mar 2024 22:51:14 +0000 Subject: [PATCH 2/2] move requirements --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 080f696..4d6f668 100755 --- a/Dockerfile +++ b/Dockerfile @@ -16,8 +16,8 @@ ENV INVOKER_KEY=${INVOKER_KEY} ENV INVOKER_REGION=${INVOKER_REGION} # Install backend dependencies -COPY requirements.txt ${LAMBDA_TASK_ROOT}/app/base_requirements.txt -RUN pip3 install -r ${LAMBDA_TASK_ROOT}/app/base_requirements.txt +COPY requirements.txt ${LAMBDA_TASK_ROOT}/base_requirements.txt +RUN pip3 install -r ${LAMBDA_TASK_ROOT}/base_requirements.txt # Copy the scripts COPY __init__.py ${LAMBDA_TASK_ROOT}/app/