alessandro trinca tornidor commited on
Commit
009261a
1 Parent(s): 158378e

[feat] copy resources folder from lisa-on-cuda repository to /var/task/resources, bump to version 1.3.1

Browse files
Files changed (4) hide show
  1. Dockerfile +6 -0
  2. poetry.lock +5 -5
  3. pyproject.toml +3 -3
  4. scripts/entrypoint.sh +1 -1
Dockerfile CHANGED
@@ -63,6 +63,11 @@ RUN poetry run python -m pip install pip wheel setuptools --upgrade
63
  RUN poetry install --with ${DEPENDENCY_GROUP} --no-root
64
 
65
  RUN git clone https://huggingface.co/aletrn/sam-quantized/ ${LAMBDA_TASK_ROOT}/sam-quantized
 
 
 
 
 
66
 
67
  FROM nvcr.io/nvidia/pytorch:24.01-py3 as runtime
68
 
@@ -138,6 +143,7 @@ RUN mkdir -p ${FASTAPI_STATIC}
138
 
139
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/sam-quantized/machine_learning_models \
140
  ${LAMBDA_TASK_ROOT}/machine_learning_models
 
141
  COPY --from=node_prod_deps /appnode/node_modules* ${FASTAPI_STATIC}/node_modules
142
  COPY --from=node_build /appnode/dist* ${FASTAPI_STATIC}/dist
143
 
 
63
  RUN poetry install --with ${DEPENDENCY_GROUP} --no-root
64
 
65
  RUN git clone https://huggingface.co/aletrn/sam-quantized/ ${LAMBDA_TASK_ROOT}/sam-quantized
66
+ RUN git clone -n --depth=1 --filter=tree:0 https://huggingface.co/spaces/aletrn/lisa-on-cuda ${LAMBDA_TASK_ROOT}/lisa-on-cuda && \
67
+ cd ${LAMBDA_TASK_ROOT}/lisa-on-cuda && \
68
+ git sparse-checkout set --no-cone resources && \
69
+ git checkout
70
+ WORKDIR ${LAMBDA_TASK_ROOT}
71
 
72
  FROM nvcr.io/nvidia/pytorch:24.01-py3 as runtime
73
 
 
143
 
144
  COPY --from=builder_global ${LAMBDA_TASK_ROOT}/sam-quantized/machine_learning_models \
145
  ${LAMBDA_TASK_ROOT}/machine_learning_models
146
+ COPY --from=builder_global ${LAMBDA_TASK_ROOT}/lisa-on-cuda/resources ${LAMBDA_TASK_ROOT}/resources
147
  COPY --from=node_prod_deps /appnode/node_modules* ${FASTAPI_STATIC}/node_modules
148
  COPY --from=node_build /appnode/dist* ${FASTAPI_STATIC}/dist
149
 
poetry.lock CHANGED
@@ -1410,13 +1410,13 @@ files = [
1410
 
1411
  [[package]]
1412
  name = "lisa-on-cuda"
1413
- version = "1.0.2"
1414
  description = ""
1415
  optional = false
1416
  python-versions = ">=3.10,<3.11"
1417
  files = [
1418
- {file = "lisa_on_cuda-1.0.2-py3-none-any.whl", hash = "sha256:fd0bab06cd673b52b6a68c0b9add8dfed2ab57737b94a6fe375cb71c1ec923e0"},
1419
- {file = "lisa_on_cuda-1.0.2.tar.gz", hash = "sha256:96b446405b27b6c001bb5e5db15489b6ba4c60b67323ab7874cc54bc9d6da56e"},
1420
  ]
1421
 
1422
  [package.dependencies]
@@ -3329,7 +3329,7 @@ testing = ["h5py (>=3.7.0)", "huggingface_hub (>=0.12.1)", "hypothesis (>=6.70.2
3329
  torch = ["safetensors[numpy]", "torch (>=1.10)"]
3330
 
3331
  [[package]]
3332
- name = "samgis_core"
3333
  version = "1.0.7"
3334
  description = "SamGIS CORE"
3335
  optional = false
@@ -4383,4 +4383,4 @@ files = [
4383
  [metadata]
4384
  lock-version = "2.0"
4385
  python-versions = "~3.10"
4386
- content-hash = "6420e74251249e5a97a0c7faa9f6bf02311ca0b7f7e1c466bb6283efd97da03d"
 
1410
 
1411
  [[package]]
1412
  name = "lisa-on-cuda"
1413
+ version = "1.0.3"
1414
  description = ""
1415
  optional = false
1416
  python-versions = ">=3.10,<3.11"
1417
  files = [
1418
+ {file = "lisa_on_cuda-1.0.3-py3-none-any.whl", hash = "sha256:e60e4abc5905c3fc29ff739430f480edeb6b4b192d1cd3aecf752d57fdfe34bd"},
1419
+ {file = "lisa_on_cuda-1.0.3.tar.gz", hash = "sha256:cdf7f61ffa1c66c7e5001d691c09cc98b901ec089e5ef3d96ba17a0cf27679bd"},
1420
  ]
1421
 
1422
  [package.dependencies]
 
3329
  torch = ["safetensors[numpy]", "torch (>=1.10)"]
3330
 
3331
  [[package]]
3332
+ name = "samgis-core"
3333
  version = "1.0.7"
3334
  description = "SamGIS CORE"
3335
  optional = false
 
4383
  [metadata]
4384
  lock-version = "2.0"
4385
  python-versions = "~3.10"
4386
+ content-hash = "99c7d41a0f92e6971da37bd09ad0857f7654fd1304524b9d182f0c2fffced075"
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
  [tool.poetry]
2
  name = "samgis-lisa-on-cuda"
3
- version = "1.3.0"
4
  description = "A VLM backend for machine learning instance segmentation on geospatial data that uses LISA (Reasoning Segmentation via Large Language Model)."
5
  authors = ["alessandro trinca tornidor <alessandro@trinca.tornidor.com>"]
6
  license = "MIT license"
@@ -8,7 +8,7 @@ readme = "README.md"
8
 
9
  [metadata]
10
  name = "samgis-lisa-on-cuda"
11
- version = "1.3.0"
12
 
13
  [tool.poetry.dependencies]
14
  bson = "^0.5.10"
@@ -23,7 +23,7 @@ python = "~3.10"
23
  python-dotenv = "^1.0.1"
24
  rasterio = "^1.3.9"
25
  requests = "^2.31.0"
26
- lisa-on-cuda = "^1.0.2"
27
  samgis-core = "^1.0.7"
28
 
29
  [tool.poetry.group.aws_lambda]
 
1
  [tool.poetry]
2
  name = "samgis-lisa-on-cuda"
3
+ version = "1.3.1"
4
  description = "A VLM backend for machine learning instance segmentation on geospatial data that uses LISA (Reasoning Segmentation via Large Language Model)."
5
  authors = ["alessandro trinca tornidor <alessandro@trinca.tornidor.com>"]
6
  license = "MIT license"
 
8
 
9
  [metadata]
10
  name = "samgis-lisa-on-cuda"
11
+ version = "1.3.1"
12
 
13
  [tool.poetry.dependencies]
14
  bson = "^0.5.10"
 
23
  python-dotenv = "^1.0.1"
24
  rasterio = "^1.3.9"
25
  requests = "^2.31.0"
26
+ lisa-on-cuda = "^1.0.3"
27
  samgis-core = "^1.0.7"
28
 
29
  [tool.poetry.group.aws_lambda]
scripts/entrypoint.sh CHANGED
@@ -19,7 +19,7 @@ nvidia-smi || true
19
  pip list
20
 
21
  which uvicorn
22
- ls -l ${WORKDIR}/venv/bin/uvicorn
23
 
24
  df -h / /home ${WORKDIR} ${XDG_CACHE_HOME}
25
 
 
19
  pip list
20
 
21
  which uvicorn
22
+ ls -l ${WORKDIR}/.venv/bin/uvicorn
23
 
24
  df -h / /home ${WORKDIR} ${XDG_CACHE_HOME}
25