doc: update README.md because of removed fastapi poetry dependency group, remove old section about docker AWS lambda
Browse files- README.md +1 -36
- docs/Changelog.md +7 -0
README.md
CHANGED
|
@@ -31,7 +31,7 @@ the README.md header section. You need to compile these fields:
|
|
| 31 |
|
| 32 |
```
|
| 33 |
sdk: gradio
|
| 34 |
-
sdk_version: 4.
|
| 35 |
app_file: app.py
|
| 36 |
```
|
| 37 |
|
|
@@ -59,7 +59,6 @@ docker stop $(docker ps -a -q); docker rm $(docker ps -a -q)
|
|
| 59 |
set -o allexport && source <(cat ./static/.env|grep VITE__) && set +o allexport;
|
| 60 |
env|grep VITE__;
|
| 61 |
docker build . -f dockerfiles/dockerfile-samgis-base --progress=plain \
|
| 62 |
-
--build-arg DEPENDENCY_GROUP="fastapi" \
|
| 63 |
--build-arg VITE__MAP_DESCRIPTION="${VITE__MAP_DESCRIPTION}" \
|
| 64 |
--build-arg VITE__SAMGIS_SPACE="${VITE__SAMGIS_SPACE}" \
|
| 65 |
--build-arg VITE__STATIC_INDEX_URL="${VITE__STATIC_INDEX_URL}" \
|
|
@@ -89,40 +88,6 @@ curl -d@./events/payload_point_eolie.json -H 'content-type: application/json' ${
|
|
| 89 |
|
| 90 |
or better visiting the swagger page on <http://localhost:7860/docs>
|
| 91 |
|
| 92 |
-
## SamGIS - lambda AWS version
|
| 93 |
-
|
| 94 |
-
Build the docker image this way:
|
| 95 |
-
|
| 96 |
-
```bash
|
| 97 |
-
# clean any old active containers
|
| 98 |
-
docker stop $(docker ps -a -q); docker rm $(docker ps -a -q)
|
| 99 |
-
|
| 100 |
-
# build the base docker image with the docker aws repository tag
|
| 101 |
-
docker build . -f dockerfiles/dockerfile-samgis-base --build-arg DEPENDENCY_GROUP=aws_lambda \
|
| 102 |
-
--tag example-docker-namespace/samgis-base-aws-lambda --progress=plain
|
| 103 |
-
|
| 104 |
-
# build the final docker image
|
| 105 |
-
docker build . -f dockerfiles/dockerfile-lambda-fastsam-api --tag example-docker-namespace/lambda-fastsam-api --progress=plain
|
| 106 |
-
```
|
| 107 |
-
|
| 108 |
-
Run the container (keep it on background) and show logs
|
| 109 |
-
|
| 110 |
-
```bash
|
| 111 |
-
docker run -d --name lambda-fastsam-api -p 8080:8080 lambda-fastsam-api; docker logs -f lambda-fastsam-api
|
| 112 |
-
```
|
| 113 |
-
|
| 114 |
-
Test it with curl using a json payload:
|
| 115 |
-
|
| 116 |
-
```bash
|
| 117 |
-
URL=http://localhost:8080/2015-03-31/functions/function/invocations
|
| 118 |
-
curl -d@./events/payload_point_eolie.json -H 'content-type: application/json' ${URL}
|
| 119 |
-
```
|
| 120 |
-
|
| 121 |
-
### Publish the aws lambda docker image
|
| 122 |
-
|
| 123 |
-
Login on aws ECR with the correct aws profile (change the example `example-docker-namespace/` repository url with the one from
|
| 124 |
-
the [ECR push command instructions page](https://eu-west-1.console.aws.amazon.com/ecr/repositories/)).
|
| 125 |
-
|
| 126 |
### Dependencies installation, local execution and local tests
|
| 127 |
|
| 128 |
The docker build process needs only the base dependency group plus the `aws_lambda` or `fastapi` optional one (right now I use almost only the `fastapi` version). Install also the `test` and/or `docs` groups if needed.
|
|
|
|
| 31 |
|
| 32 |
```
|
| 33 |
sdk: gradio
|
| 34 |
+
sdk_version: [current Gradio version, e.g. 4.44.0]
|
| 35 |
app_file: app.py
|
| 36 |
```
|
| 37 |
|
|
|
|
| 59 |
set -o allexport && source <(cat ./static/.env|grep VITE__) && set +o allexport;
|
| 60 |
env|grep VITE__;
|
| 61 |
docker build . -f dockerfiles/dockerfile-samgis-base --progress=plain \
|
|
|
|
| 62 |
--build-arg VITE__MAP_DESCRIPTION="${VITE__MAP_DESCRIPTION}" \
|
| 63 |
--build-arg VITE__SAMGIS_SPACE="${VITE__SAMGIS_SPACE}" \
|
| 64 |
--build-arg VITE__STATIC_INDEX_URL="${VITE__STATIC_INDEX_URL}" \
|
|
|
|
| 88 |
|
| 89 |
or better visiting the swagger page on <http://localhost:7860/docs>
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
### Dependencies installation, local execution and local tests
|
| 92 |
|
| 93 |
The docker build process needs only the base dependency group plus the `aws_lambda` or `fastapi` optional one (right now I use almost only the `fastapi` version). Install also the `test` and/or `docs` groups if needed.
|
docs/Changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
| 1 |
# Changelog
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
## Version 1.6.10
|
| 4 |
|
| 5 |
- Update frontend dependencies
|
|
|
|
| 1 |
# Changelog
|
| 2 |
|
| 3 |
+
## Version 1.7.0
|
| 4 |
+
|
| 5 |
+
- Update frontend dependencies
|
| 6 |
+
- remove backend dependencies already installed by samgis-web (samgis-core = 3.0.14, samgis-web = 1.0.14)
|
| 7 |
+
- remove poetry dependency groups 'fastapi' and 'gradio'
|
| 8 |
+
- update Dockerfile, README.md because of removed fastapi poetry dependency group
|
| 9 |
+
|
| 10 |
## Version 1.6.10
|
| 11 |
|
| 12 |
- Update frontend dependencies
|