[debug] change architecture to x86
Browse files
README.md
CHANGED
@@ -24,20 +24,21 @@ docker build . -f dockerfiles/dockerfile-lambda-gdal-runner --tag 686901913580.d
|
|
24 |
docker build . -f dockerfiles/dockerfile-lambda-gdal-runner --build-arg RIE="https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie" --tag 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-gdal-runner --progress=plain
|
25 |
|
26 |
# build the final docker image
|
27 |
-
docker build . -f dockerfiles/dockerfile-lambda-
|
28 |
```
|
29 |
|
30 |
Run the container (keep it on background) and show logs
|
31 |
|
32 |
```bash
|
33 |
-
docker run -d --name lambda-
|
34 |
```
|
35 |
|
36 |
Test it with curl:
|
37 |
|
38 |
```bash
|
|
|
39 |
curl -X 'POST' \
|
40 |
-
|
41 |
-H 'accept: application/json' \
|
42 |
-d '{}'
|
43 |
```
|
@@ -50,6 +51,6 @@ curl -X 'POST' \
|
|
50 |
2. Build and tag the docker images, then push them:
|
51 |
```
|
52 |
docker push 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-gdal-runner:latest
|
53 |
-
docker push 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-
|
54 |
```
|
55 |
3. It's possible to publish a new aws lambda version from cmd or from lambda page
|
|
|
24 |
docker build . -f dockerfiles/dockerfile-lambda-gdal-runner --build-arg RIE="https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie" --tag 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-gdal-runner --progress=plain
|
25 |
|
26 |
# build the final docker image
|
27 |
+
docker build . -f dockerfiles/dockerfile-lambda-fastsam-api --tag 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-fastsam-api
|
28 |
```
|
29 |
|
30 |
Run the container (keep it on background) and show logs
|
31 |
|
32 |
```bash
|
33 |
+
docker tag 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-fastsam-api:latest lambda-fastsam-api;docker run -d --name lambda-fastsam-api -p 8080:8080 lambda-fastsam-api; docker logs -f lambda-fastsam-api
|
34 |
```
|
35 |
|
36 |
Test it with curl:
|
37 |
|
38 |
```bash
|
39 |
+
URL=http://localhost:8080/2015-03-31/functions/function/invocations
|
40 |
curl -X 'POST' \
|
41 |
+
${URL} \
|
42 |
-H 'accept: application/json' \
|
43 |
-d '{}'
|
44 |
```
|
|
|
51 |
2. Build and tag the docker images, then push them:
|
52 |
```
|
53 |
docker push 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-gdal-runner:latest
|
54 |
+
docker push 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-fastsam-api:latest
|
55 |
```
|
56 |
3. It's possible to publish a new aws lambda version from cmd or from lambda page
|
dockerfiles/{dockerfile-lambda-samgeo-api → dockerfile-lambda-fastsam-api}
RENAMED
File without changes
|
dockerfiles/dockerfile-lambda-gdal-runner
CHANGED
@@ -3,7 +3,7 @@ FROM ghcr.io/osgeo/gdal:ubuntu-small-3.7.2
|
|
3 |
# Include global arg in this stage of the build
|
4 |
ARG LAMBDA_TASK_ROOT="/var/task"
|
5 |
ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
|
6 |
-
ARG RIE="https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie
|
7 |
|
8 |
RUN echo "ENV RIE: $RIE ..."
|
9 |
|
|
|
3 |
# Include global arg in this stage of the build
|
4 |
ARG LAMBDA_TASK_ROOT="/var/task"
|
5 |
ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
|
6 |
+
ARG RIE="https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie"
|
7 |
|
8 |
RUN echo "ENV RIE: $RIE ..."
|
9 |
|