From 4fe896a3b682af726cbd6f47db250193ad957529 Mon Sep 17 00:00:00 2001 From: Ahmad Saleem Z Date: Sun, 11 Jun 2023 11:23:45 +0200 Subject: [PATCH] fix ARG in Dockerfile --- aws/lambda/Dockerfile | 8 ++++---- aws/lambda/README.md | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/aws/lambda/Dockerfile b/aws/lambda/Dockerfile index 9716f1dc84..fcffa1e87b 100644 --- a/aws/lambda/Dockerfile +++ b/aws/lambda/Dockerfile @@ -1,11 +1,11 @@ # Dockerfile for Running AWS Lambda Function with Python and IfcOpenShell -# Set the location of your Lambda function code -ARG FUNCTION_DIR="/var/task" - # Base image: Python 3.9 from AWS's public container registry FROM public.ecr.aws/docker/library/python:3.9 AS build +# Set the location of your Lambda function code +ARG FUNCTION_DIR="/var/task" + # Install necessary packages RUN apt-get -y update && apt-get -y install unzip curl @@ -13,7 +13,7 @@ RUN apt-get -y update && apt-get -y install unzip curl RUN pip install --target ${FUNCTION_DIR} awslambdaric # Set the IfcOpenShell build version (check available builds at: https://blenderbim.org/docs-python/ifcopenshell-python/installation.html) -ARG IFC_OPENSHELL_BUILD="v0.7.0-476ab50" +ARG IFC_OPENSHELL_BUILD="39-v0.7.0-476ab50" # Download and extract IfcOpenShell RUN curl https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-${IFC_OPENSHELL_BUILD}-linux64.zip -O && \ diff --git a/aws/lambda/README.md b/aws/lambda/README.md index d95a2c526e..0ba5a80273 100644 --- a/aws/lambda/README.md +++ b/aws/lambda/README.md @@ -3,8 +3,6 @@ Dockerized AWS Lambda Function with Python and IfcOpenShell This guide provides a Dockerfile and sample code to help you run an AWS Lambda function written in Python and utilizing IfcOpenShell library. -> Note: This is a superficial guideline, in order to make this work for your usecase you will need a good understanding of other AWS services like SQS, S3, API Gateway etc. - Prerequisites ------------- @@ -42,3 +40,9 @@ Getting Started 7. **Deploy to lambda** This is beyond the scope of this example. Please refer to AWS documentation. Some tools that could be useful are - AWS CloudFormaton, AWS CDK, pulumi or terraform + + +--------- +> Note: This is a superficial guide, in order to make this work for your usecase you will need a good understanding of other AWS services like SQS, S3, API Gateway etc. + +For more information on building lambda containers refer to this [guide](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html). \ No newline at end of file