File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ if [ -z " ${AWS_LAMBDA_RUNTIME_API} " ]; then
3
+ exec /usr/local/bin/aws-lambda-rie /usr/bin/npx aws-lambda-ric
4
+ else
5
+ exec /usr/bin/npx aws-lambda-ric
6
+ fi
Original file line number Diff line number Diff line change 1
1
FROM ghcr.io/pnnl/exago:exago-develop-x436raytwpfhkihapsbpto3jd3dpfyqg.spack
2
2
# Copy requirements.txt
3
3
# COPY requirements.txt ${LAMBDA_TASK_ROOT}
4
-
4
+ # Define lambda task root
5
+ ENV LAMBDA_TASK_ROOT /var/task
5
6
# Copy function code
7
+ RUN mkdir -p ${LAMBDA_TASK_ROOT}
6
8
COPY lambda_handler.py ${LAMBDA_TASK_ROOT}
7
9
ADD python_wrapper ${LAMBDA_TASK_ROOT}/python_wrapper
8
10
@@ -18,6 +20,9 @@ RUN apt-get -yqq update && apt-get -yqq upgrade \
18
20
RUN pip install --upgrade pip
19
21
# RUN pip install -r ${LAMBDA_TASK_ROOT}/requirements.txt
20
22
RUN pip install awslambdaric
23
+ # Make port 9000 available to the world outside this container
24
+ EXPOSE 9000
25
+ # ADD aws-lambda-rie /usr/local/bin/aws-lambda-rie
21
26
ENTRYPOINT ["python" , "-m" , "awslambdaric" ]
22
27
ENV PYTHONPATH "${PYTHONPATH}:/usr/local/lib/python3.10/dist-packages"
23
28
Original file line number Diff line number Diff line change 1
- import boto3
1
+ import boto
2
2
import subprocess
3
3
import os
4
4
import exago
You can’t perform that action at this time.
0 commit comments