File size: 1,042 Bytes
243f395 14effdf 243f395 9e6626c 14effdf 7d6e00c 243f395 7d6e00c f2a79fa 26b4f04 7d6e00c 14effdf 243f395 14effdf 243f395 14effdf 243f395 |
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 |
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.7.2
# Include global arg in this stage of the build
ARG LAMBDA_TASK_ROOT="/var/task"
ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
ARG RIE="https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie-arm64"
RUN echo "ENV RIE: $RIE ..."
# Set working directory to function root directory
WORKDIR ${LAMBDA_TASK_ROOT}
COPY requirements.txt ${LAMBDA_TASK_ROOT}/requirements.txt
RUN apt update && apt install -y curl python3-pip libgl1
RUN which python
RUN python --version
RUN python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
RUN python -m pip install -r ${LAMBDA_TASK_ROOT}/requirements.txt --target ${LAMBDA_TASK_ROOT}
RUN curl -Lo /usr/local/bin/aws-lambda-rie ${RIE}
RUN chmod +x /usr/local/bin/aws-lambda-rie
COPY ./scripts/lambda-entrypoint.sh /lambda-entrypoint.sh
RUN chmod +x /lambda-entrypoint.sh
RUN ls -l /lambda-entrypoint.sh
ENTRYPOINT ["/lambda-entrypoint.sh"]
|