[doc] SamGIS version: handle case for package not installed; update README.md
Browse files- Dockerfile +3 -1
- README.md +2 -2
- poetry.lock +59 -60
- samgis/__version__.py +5 -1
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM registry.gitlab.com/aletrn/gis-prediction:1.
|
2 |
|
3 |
# Include global arg in this stage of the build
|
4 |
ARG LAMBDA_TASK_ROOT="/var/task"
|
@@ -12,6 +12,8 @@ WORKDIR ${LAMBDA_TASK_ROOT}
|
|
12 |
|
13 |
COPY samgis ${LAMBDA_TASK_ROOT}/samgis
|
14 |
COPY wrappers ${LAMBDA_TASK_ROOT}/wrappers
|
|
|
|
|
15 |
|
16 |
RUN ls -l /usr/bin/which
|
17 |
RUN /usr/bin/which python
|
|
|
1 |
+
FROM registry.gitlab.com/aletrn/gis-prediction:1.3.0
|
2 |
|
3 |
# Include global arg in this stage of the build
|
4 |
ARG LAMBDA_TASK_ROOT="/var/task"
|
|
|
12 |
|
13 |
COPY samgis ${LAMBDA_TASK_ROOT}/samgis
|
14 |
COPY wrappers ${LAMBDA_TASK_ROOT}/wrappers
|
15 |
+
COPY pyproject.toml poetry.lock README.md ${LAMBDA_TASK_ROOT}
|
16 |
+
RUN echo "# install samgis #" && pip install .
|
17 |
|
18 |
RUN ls -l /usr/bin/which
|
19 |
RUN /usr/bin/which python
|
README.md
CHANGED
@@ -35,13 +35,13 @@ docker stop $(docker ps -a -q); docker rm $(docker ps -a -q)
|
|
35 |
)
|
36 |
|
37 |
# build the image, use the tag "samgis-huggingface"
|
38 |
-
docker build . --tag
|
39 |
```
|
40 |
|
41 |
Run the container (keep it on background) and show logs
|
42 |
|
43 |
```bash
|
44 |
-
docker run -d --name samgis-huggingface -p 7860:7860
|
45 |
```
|
46 |
|
47 |
Test it with curl using a json payload:
|
|
|
35 |
)
|
36 |
|
37 |
# build the image, use the tag "samgis-huggingface"
|
38 |
+
docker build . --tag registry.gitlab.com/aletrn/samgis-huggingface --progress=plain
|
39 |
```
|
40 |
|
41 |
Run the container (keep it on background) and show logs
|
42 |
|
43 |
```bash
|
44 |
+
docker run -d --name samgis-huggingface -p 7860:7860 registry.gitlab.com/aletrn/samgis-huggingface; docker logs -f samgis-huggingface
|
45 |
```
|
46 |
|
47 |
Test it with curl using a json payload:
|
poetry.lock
CHANGED
@@ -2133,21 +2133,19 @@ name = "samgis-core"
|
|
2133 |
version = "1.1.2"
|
2134 |
description = "SamGIS CORE"
|
2135 |
optional = false
|
2136 |
-
python-versions = "
|
2137 |
-
files = [
|
2138 |
-
|
|
|
|
|
2139 |
|
2140 |
[package.dependencies]
|
2141 |
-
bson = "
|
2142 |
-
loguru = "
|
2143 |
numpy = "1.25.2"
|
2144 |
onnxruntime = "1.16.3"
|
2145 |
opencv-python-headless = "4.8.1.78"
|
2146 |
-
pillow = "
|
2147 |
-
|
2148 |
-
[package.source]
|
2149 |
-
type = "directory"
|
2150 |
-
url = "../samgis_core"
|
2151 |
|
2152 |
[[package]]
|
2153 |
name = "setuptools"
|
@@ -2167,56 +2165,56 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar
|
|
2167 |
|
2168 |
[[package]]
|
2169 |
name = "shapely"
|
2170 |
-
version = "2.0.
|
2171 |
description = "Manipulation and analysis of geometric objects"
|
2172 |
optional = false
|
2173 |
python-versions = ">=3.7"
|
2174 |
files = [
|
2175 |
-
{file = "shapely-2.0.
|
2176 |
-
{file = "shapely-2.0.
|
2177 |
-
{file = "shapely-2.0.
|
2178 |
-
{file = "shapely-2.0.
|
2179 |
-
{file = "shapely-2.0.
|
2180 |
-
{file = "shapely-2.0.
|
2181 |
-
{file = "shapely-2.0.
|
2182 |
-
{file = "shapely-2.0.
|
2183 |
-
{file = "shapely-2.0.
|
2184 |
-
{file = "shapely-2.0.
|
2185 |
-
{file = "shapely-2.0.
|
2186 |
-
{file = "shapely-2.0.
|
2187 |
-
{file = "shapely-2.0.
|
2188 |
-
{file = "shapely-2.0.
|
2189 |
-
{file = "shapely-2.0.
|
2190 |
-
{file = "shapely-2.0.
|
2191 |
-
{file = "shapely-2.0.
|
2192 |
-
{file = "shapely-2.0.
|
2193 |
-
{file = "shapely-2.0.
|
2194 |
-
{file = "shapely-2.0.
|
2195 |
-
{file = "shapely-2.0.
|
2196 |
-
{file = "shapely-2.0.
|
2197 |
-
{file = "shapely-2.0.
|
2198 |
-
{file = "shapely-2.0.
|
2199 |
-
{file = "shapely-2.0.
|
2200 |
-
{file = "shapely-2.0.
|
2201 |
-
{file = "shapely-2.0.
|
2202 |
-
{file = "shapely-2.0.
|
2203 |
-
{file = "shapely-2.0.
|
2204 |
-
{file = "shapely-2.0.
|
2205 |
-
{file = "shapely-2.0.
|
2206 |
-
{file = "shapely-2.0.
|
2207 |
-
{file = "shapely-2.0.
|
2208 |
-
{file = "shapely-2.0.
|
2209 |
-
{file = "shapely-2.0.
|
2210 |
-
{file = "shapely-2.0.
|
2211 |
-
{file = "shapely-2.0.
|
2212 |
-
{file = "shapely-2.0.
|
2213 |
-
{file = "shapely-2.0.
|
2214 |
-
{file = "shapely-2.0.
|
2215 |
-
{file = "shapely-2.0.
|
2216 |
]
|
2217 |
|
2218 |
[package.dependencies]
|
2219 |
-
numpy = ">=1.14,<
|
2220 |
|
2221 |
[package.extras]
|
2222 |
docs = ["matplotlib", "numpydoc (==1.1.*)", "sphinx", "sphinx-book-theme", "sphinx-remove-toctrees"]
|
@@ -2369,20 +2367,20 @@ test = ["hypothesis", "pytest"]
|
|
2369 |
|
2370 |
[[package]]
|
2371 |
name = "sphinx"
|
2372 |
-
version = "7.
|
2373 |
description = "Python documentation generator"
|
2374 |
optional = false
|
2375 |
python-versions = ">=3.9"
|
2376 |
files = [
|
2377 |
-
{file = "sphinx-7.
|
2378 |
-
{file = "sphinx-7.
|
2379 |
]
|
2380 |
|
2381 |
[package.dependencies]
|
2382 |
-
alabaster = ">=0.7,<0.8"
|
2383 |
babel = ">=2.9"
|
2384 |
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
2385 |
-
docutils = ">=0.18.1,<0.
|
2386 |
imagesize = ">=1.3"
|
2387 |
Jinja2 = ">=3.0"
|
2388 |
packaging = ">=21.0"
|
@@ -2395,11 +2393,12 @@ sphinxcontrib-htmlhelp = ">=2.0.0"
|
|
2395 |
sphinxcontrib-jsmath = "*"
|
2396 |
sphinxcontrib-qthelp = "*"
|
2397 |
sphinxcontrib-serializinghtml = ">=1.1.9"
|
|
|
2398 |
|
2399 |
[package.extras]
|
2400 |
docs = ["sphinxcontrib-websupport"]
|
2401 |
-
lint = ["
|
2402 |
-
test = ["cython (>=3.0)", "
|
2403 |
|
2404 |
[[package]]
|
2405 |
name = "sphinx-autodoc-defaultargs"
|
|
|
2133 |
version = "1.1.2"
|
2134 |
description = "SamGIS CORE"
|
2135 |
optional = false
|
2136 |
+
python-versions = "<3.11,>=3.10"
|
2137 |
+
files = [
|
2138 |
+
{file = "samgis_core-1.1.2-py3-none-any.whl", hash = "sha256:ef15ce6c0a9f5030c239713aad541d37afe9daa483e44a8de560970ddea5b352"},
|
2139 |
+
{file = "samgis_core-1.1.2.tar.gz", hash = "sha256:8d240632725b694b487e224f547401a28d299f03d9e9870cd9b11bb8f163af88"},
|
2140 |
+
]
|
2141 |
|
2142 |
[package.dependencies]
|
2143 |
+
bson = ">=0.5.10,<0.6.0"
|
2144 |
+
loguru = ">=0.7.2,<0.8.0"
|
2145 |
numpy = "1.25.2"
|
2146 |
onnxruntime = "1.16.3"
|
2147 |
opencv-python-headless = "4.8.1.78"
|
2148 |
+
pillow = ">=10.2.0,<11.0.0"
|
|
|
|
|
|
|
|
|
2149 |
|
2150 |
[[package]]
|
2151 |
name = "setuptools"
|
|
|
2165 |
|
2166 |
[[package]]
|
2167 |
name = "shapely"
|
2168 |
+
version = "2.0.4"
|
2169 |
description = "Manipulation and analysis of geometric objects"
|
2170 |
optional = false
|
2171 |
python-versions = ">=3.7"
|
2172 |
files = [
|
2173 |
+
{file = "shapely-2.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:011b77153906030b795791f2fdfa2d68f1a8d7e40bce78b029782ade3afe4f2f"},
|
2174 |
+
{file = "shapely-2.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9831816a5d34d5170aa9ed32a64982c3d6f4332e7ecfe62dc97767e163cb0b17"},
|
2175 |
+
{file = "shapely-2.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5c4849916f71dc44e19ed370421518c0d86cf73b26e8656192fcfcda08218fbd"},
|
2176 |
+
{file = "shapely-2.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:841f93a0e31e4c64d62ea570d81c35de0f6cea224568b2430d832967536308e6"},
|
2177 |
+
{file = "shapely-2.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b4431f522b277c79c34b65da128029a9955e4481462cbf7ebec23aab61fc58"},
|
2178 |
+
{file = "shapely-2.0.4-cp310-cp310-win32.whl", hash = "sha256:92a41d936f7d6743f343be265ace93b7c57f5b231e21b9605716f5a47c2879e7"},
|
2179 |
+
{file = "shapely-2.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:30982f79f21bb0ff7d7d4a4e531e3fcaa39b778584c2ce81a147f95be1cd58c9"},
|
2180 |
+
{file = "shapely-2.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:de0205cb21ad5ddaef607cda9a3191eadd1e7a62a756ea3a356369675230ac35"},
|
2181 |
+
{file = "shapely-2.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7d56ce3e2a6a556b59a288771cf9d091470116867e578bebced8bfc4147fbfd7"},
|
2182 |
+
{file = "shapely-2.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:58b0ecc505bbe49a99551eea3f2e8a9b3b24b3edd2a4de1ac0dc17bc75c9ec07"},
|
2183 |
+
{file = "shapely-2.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:790a168a808bd00ee42786b8ba883307c0e3684ebb292e0e20009588c426da47"},
|
2184 |
+
{file = "shapely-2.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4310b5494271e18580d61022c0857eb85d30510d88606fa3b8314790df7f367d"},
|
2185 |
+
{file = "shapely-2.0.4-cp311-cp311-win32.whl", hash = "sha256:63f3a80daf4f867bd80f5c97fbe03314348ac1b3b70fb1c0ad255a69e3749879"},
|
2186 |
+
{file = "shapely-2.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:c52ed79f683f721b69a10fb9e3d940a468203f5054927215586c5d49a072de8d"},
|
2187 |
+
{file = "shapely-2.0.4-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:5bbd974193e2cc274312da16b189b38f5f128410f3377721cadb76b1e8ca5328"},
|
2188 |
+
{file = "shapely-2.0.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:41388321a73ba1a84edd90d86ecc8bfed55e6a1e51882eafb019f45895ec0f65"},
|
2189 |
+
{file = "shapely-2.0.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0776c92d584f72f1e584d2e43cfc5542c2f3dd19d53f70df0900fda643f4bae6"},
|
2190 |
+
{file = "shapely-2.0.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c75c98380b1ede1cae9a252c6dc247e6279403fae38c77060a5e6186c95073ac"},
|
2191 |
+
{file = "shapely-2.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3e700abf4a37b7b8b90532fa6ed5c38a9bfc777098bc9fbae5ec8e618ac8f30"},
|
2192 |
+
{file = "shapely-2.0.4-cp312-cp312-win32.whl", hash = "sha256:4f2ab0faf8188b9f99e6a273b24b97662194160cc8ca17cf9d1fb6f18d7fb93f"},
|
2193 |
+
{file = "shapely-2.0.4-cp312-cp312-win_amd64.whl", hash = "sha256:03152442d311a5e85ac73b39680dd64a9892fa42bb08fd83b3bab4fe6999bfa0"},
|
2194 |
+
{file = "shapely-2.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:994c244e004bc3cfbea96257b883c90a86e8cbd76e069718eb4c6b222a56f78b"},
|
2195 |
+
{file = "shapely-2.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05ffd6491e9e8958b742b0e2e7c346635033d0a5f1a0ea083547fcc854e5d5cf"},
|
2196 |
+
{file = "shapely-2.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbdc1140a7d08faa748256438291394967aa54b40009f54e8d9825e75ef6113"},
|
2197 |
+
{file = "shapely-2.0.4-cp37-cp37m-win32.whl", hash = "sha256:5af4cd0d8cf2912bd95f33586600cac9c4b7c5053a036422b97cfe4728d2eb53"},
|
2198 |
+
{file = "shapely-2.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:464157509ce4efa5ff285c646a38b49f8c5ef8d4b340f722685b09bb033c5ccf"},
|
2199 |
+
{file = "shapely-2.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:489c19152ec1f0e5c5e525356bcbf7e532f311bff630c9b6bc2db6f04da6a8b9"},
|
2200 |
+
{file = "shapely-2.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b79bbd648664aa6f44ef018474ff958b6b296fed5c2d42db60078de3cffbc8aa"},
|
2201 |
+
{file = "shapely-2.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:674d7baf0015a6037d5758496d550fc1946f34bfc89c1bf247cabdc415d7747e"},
|
2202 |
+
{file = "shapely-2.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cd4ccecc5ea5abd06deeaab52fcdba372f649728050c6143cc405ee0c166679"},
|
2203 |
+
{file = "shapely-2.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb5cdcbbe3080181498931b52a91a21a781a35dcb859da741c0345c6402bf00c"},
|
2204 |
+
{file = "shapely-2.0.4-cp38-cp38-win32.whl", hash = "sha256:55a38dcd1cee2f298d8c2ebc60fc7d39f3b4535684a1e9e2f39a80ae88b0cea7"},
|
2205 |
+
{file = "shapely-2.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:ec555c9d0db12d7fd777ba3f8b75044c73e576c720a851667432fabb7057da6c"},
|
2206 |
+
{file = "shapely-2.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3f9103abd1678cb1b5f7e8e1af565a652e036844166c91ec031eeb25c5ca8af0"},
|
2207 |
+
{file = "shapely-2.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:263bcf0c24d7a57c80991e64ab57cba7a3906e31d2e21b455f493d4aab534aaa"},
|
2208 |
+
{file = "shapely-2.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ddf4a9bfaac643e62702ed662afc36f6abed2a88a21270e891038f9a19bc08fc"},
|
2209 |
+
{file = "shapely-2.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:485246fcdb93336105c29a5cfbff8a226949db37b7473c89caa26c9bae52a242"},
|
2210 |
+
{file = "shapely-2.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8de4578e838a9409b5b134a18ee820730e507b2d21700c14b71a2b0757396acc"},
|
2211 |
+
{file = "shapely-2.0.4-cp39-cp39-win32.whl", hash = "sha256:9dab4c98acfb5fb85f5a20548b5c0abe9b163ad3525ee28822ffecb5c40e724c"},
|
2212 |
+
{file = "shapely-2.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:31c19a668b5a1eadab82ff070b5a260478ac6ddad3a5b62295095174a8d26398"},
|
2213 |
+
{file = "shapely-2.0.4.tar.gz", hash = "sha256:5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8"},
|
2214 |
]
|
2215 |
|
2216 |
[package.dependencies]
|
2217 |
+
numpy = ">=1.14,<3"
|
2218 |
|
2219 |
[package.extras]
|
2220 |
docs = ["matplotlib", "numpydoc (==1.1.*)", "sphinx", "sphinx-book-theme", "sphinx-remove-toctrees"]
|
|
|
2367 |
|
2368 |
[[package]]
|
2369 |
name = "sphinx"
|
2370 |
+
version = "7.3.5"
|
2371 |
description = "Python documentation generator"
|
2372 |
optional = false
|
2373 |
python-versions = ">=3.9"
|
2374 |
files = [
|
2375 |
+
{file = "sphinx-7.3.5-py3-none-any.whl", hash = "sha256:e6a8f418321429669ef9c1e20c1f294b3fe1f248206b46044c86e1545480687f"},
|
2376 |
+
{file = "sphinx-7.3.5.tar.gz", hash = "sha256:30d03bbaa53b77d38863fd6b95cc4edb4a84a1512787b3b0c12fb3b4fb25d9e9"},
|
2377 |
]
|
2378 |
|
2379 |
[package.dependencies]
|
2380 |
+
alabaster = ">=0.7.14,<0.8.0"
|
2381 |
babel = ">=2.9"
|
2382 |
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
2383 |
+
docutils = ">=0.18.1,<0.22"
|
2384 |
imagesize = ">=1.3"
|
2385 |
Jinja2 = ">=3.0"
|
2386 |
packaging = ">=21.0"
|
|
|
2393 |
sphinxcontrib-jsmath = "*"
|
2394 |
sphinxcontrib-qthelp = "*"
|
2395 |
sphinxcontrib-serializinghtml = ">=1.1.9"
|
2396 |
+
tomli = {version = ">=2", markers = "python_version < \"3.11\""}
|
2397 |
|
2398 |
[package.extras]
|
2399 |
docs = ["sphinxcontrib-websupport"]
|
2400 |
+
lint = ["flake8 (>=3.5.0)", "importlib_metadata", "mypy (==1.9.0)", "pytest (>=6.0)", "ruff (==0.3.7)", "sphinx-lint", "tomli", "types-docutils", "types-requests"]
|
2401 |
+
test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=6.0)", "setuptools (>=67.0)"]
|
2402 |
|
2403 |
[[package]]
|
2404 |
name = "sphinx-autodoc-defaultargs"
|
samgis/__version__.py
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
import importlib.metadata
|
2 |
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
1 |
import importlib.metadata
|
2 |
|
3 |
|
4 |
+
try:
|
5 |
+
__version__ = importlib.metadata.version(__package__ or __name__)
|
6 |
+
except importlib.metadata.PackageNotFoundError or ImportError as e:
|
7 |
+
print(f"metadata::e: {type(e)}, {e}: package installed?")
|
8 |
+
__version__ = "1.3.0"
|