alessandro trinca tornidor
commited on
Commit
•
250c563
1
Parent(s):
94bbfca
ci: removed some old references to files and folders that docker build should copy from local, add missing files
Browse files- Dockerfile +15 -9
- dockerfiles/apt_preferences_ubuntu +9 -0
- dockerfiles/ubuntu.sources +18 -0
- pyproject.toml +2 -2
Dockerfile
CHANGED
@@ -33,15 +33,20 @@ RUN echo "arg dep:"
|
|
33 |
|
34 |
# Set working directory to function root directory
|
35 |
WORKDIR ${LAMBDA_TASK_ROOT}
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
RUN cat /etc/lsb-release
|
39 |
# avoid segment-geospatial exception caused by missing libGL.so.1 library
|
40 |
RUN echo "BUILDER: check libz.s* before start" && ls -l /usr/lib/${ARCH}-linux-gnu/libz.so*
|
41 |
|
42 |
RUN apt update && apt upgrade -y && apt install -y libgl1 curl python3-pip git-lfs && apt clean
|
43 |
-
COPY ./dockerfiles/apt_preferences_ubuntu /etc/apt/preferences
|
44 |
-
COPY ./dockerfiles/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
45 |
#RUN echo "run update noble..."
|
46 |
#RUN apt update
|
47 |
#RUN apt update && apt install -t noble zlib1g -y
|
@@ -51,7 +56,7 @@ RUN echo "BUILDER: check libz.s* after install from trixie" && ls -l /usr/lib/${
|
|
51 |
RUN ls -l /etc/apt/sources* /etc/apt/preferences*
|
52 |
|
53 |
# poetry installation path is NOT within ${LAMBDA_TASK_ROOT}: not needed for runtime docker image
|
54 |
-
RUN python -m pip install -r ${LAMBDA_TASK_ROOT}/requirements_poetry.txt
|
55 |
|
56 |
RUN which poetry && poetry --version && poetry config --list
|
57 |
RUN poetry config virtualenvs.path ${LAMBDA_TASK_ROOT}
|
@@ -104,7 +109,7 @@ ENV PATH="$PNPM_HOME:$PATH"
|
|
104 |
|
105 |
RUN corepack enable
|
106 |
|
107 |
-
COPY
|
108 |
WORKDIR /appnode
|
109 |
# RUN if [ "${DEPENDENCY_GROUP}" = "fastapi" ]; then echo "pnpm store path:" && pnpm store path; fi
|
110 |
RUN ls -l /appnode
|
@@ -147,7 +152,7 @@ RUN df -h
|
|
147 |
RUN echo "creating FASTAPI_STATIC folder: ${FASTAPI_STATIC}, use `mkdir -p` to avoid failure if missing parent folder ..."
|
148 |
RUN mkdir -p ${FASTAPI_STATIC}
|
149 |
|
150 |
-
COPY --from=builder_global
|
151 |
${LAMBDA_TASK_ROOT}/machine_learning_models
|
152 |
RUN ls -ld ${LAMBDA_TASK_ROOT}/machine_learning_models
|
153 |
RUN ls -lh ${LAMBDA_TASK_ROOT}/machine_learning_models
|
@@ -169,9 +174,8 @@ ENV IS_AWS_LAMBDA=""
|
|
169 |
# Set working directory to function root directory
|
170 |
WORKDIR ${LAMBDA_TASK_ROOT}
|
171 |
|
172 |
-
COPY
|
173 |
-
COPY
|
174 |
-
COPY scripts ${LAMBDA_TASK_ROOT}/scripts
|
175 |
RUN chmod +x ${LAMBDA_TASK_ROOT}/scripts/entrypoint.sh
|
176 |
RUN chmod +x ${LAMBDA_TASK_ROOT}/scripts/docker_entrypoint.sh
|
177 |
RUN ls -l ${LAMBDA_TASK_ROOT}/scripts/entrypoint.sh ${LAMBDA_TASK_ROOT}/scripts/docker_entrypoint.sh
|
@@ -179,6 +183,8 @@ RUN ls -l ${LAMBDA_TASK_ROOT}/scripts/entrypoint.sh ${LAMBDA_TASK_ROOT}/scripts/
|
|
179 |
RUN ls -l /usr/bin/which
|
180 |
RUN /usr/bin/which python
|
181 |
RUN python --version
|
|
|
|
|
182 |
RUN echo "PYTHONPATH: ${PYTHONPATH}."
|
183 |
RUN echo "PATH: ${PATH}."
|
184 |
RUN echo "LAMBDA_TASK_ROOT: ${LAMBDA_TASK_ROOT}."
|
|
|
33 |
|
34 |
# Set working directory to function root directory
|
35 |
WORKDIR ${LAMBDA_TASK_ROOT}
|
36 |
+
RUN git clone -n --depth=1 --filter=tree:0 https://huggingface.co/spaces/aletrn/samgis-lisa-on-cuda ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda && \
|
37 |
+
cd ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda && \
|
38 |
+
git sparse-checkout set --no-cone README.md p\* requirements_poetry.txt static dockerfiles wrappers scripts && \
|
39 |
+
git checkout
|
40 |
+
COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/dockerfiles/apt_preferences_ubuntu /etc/apt/preferences
|
41 |
+
COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/dockerfiles/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
42 |
+
RUN ls -l /etc/apt/preferences
|
43 |
+
RUN ls -l /etc/apt/sources.list.d/ubuntu.sources
|
44 |
|
45 |
RUN cat /etc/lsb-release
|
46 |
# avoid segment-geospatial exception caused by missing libGL.so.1 library
|
47 |
RUN echo "BUILDER: check libz.s* before start" && ls -l /usr/lib/${ARCH}-linux-gnu/libz.so*
|
48 |
|
49 |
RUN apt update && apt upgrade -y && apt install -y libgl1 curl python3-pip git-lfs && apt clean
|
|
|
|
|
50 |
#RUN echo "run update noble..."
|
51 |
#RUN apt update
|
52 |
#RUN apt update && apt install -t noble zlib1g -y
|
|
|
56 |
RUN ls -l /etc/apt/sources* /etc/apt/preferences*
|
57 |
|
58 |
# poetry installation path is NOT within ${LAMBDA_TASK_ROOT}: not needed for runtime docker image
|
59 |
+
RUN python -m pip install -r ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/requirements_poetry.txt
|
60 |
|
61 |
RUN which poetry && poetry --version && poetry config --list
|
62 |
RUN poetry config virtualenvs.path ${LAMBDA_TASK_ROOT}
|
|
|
109 |
|
110 |
RUN corepack enable
|
111 |
|
112 |
+
COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/static /appnode
|
113 |
WORKDIR /appnode
|
114 |
# RUN if [ "${DEPENDENCY_GROUP}" = "fastapi" ]; then echo "pnpm store path:" && pnpm store path; fi
|
115 |
RUN ls -l /appnode
|
|
|
152 |
RUN echo "creating FASTAPI_STATIC folder: ${FASTAPI_STATIC}, use `mkdir -p` to avoid failure if missing parent folder ..."
|
153 |
RUN mkdir -p ${FASTAPI_STATIC}
|
154 |
|
155 |
+
COPY --from=builder_global ${LAMBDA_TASK_ROOT}/sam-quantized/machine_learning_models \
|
156 |
${LAMBDA_TASK_ROOT}/machine_learning_models
|
157 |
RUN ls -ld ${LAMBDA_TASK_ROOT}/machine_learning_models
|
158 |
RUN ls -lh ${LAMBDA_TASK_ROOT}/machine_learning_models
|
|
|
174 |
# Set working directory to function root directory
|
175 |
WORKDIR ${LAMBDA_TASK_ROOT}
|
176 |
|
177 |
+
COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/wrappers ${LAMBDA_TASK_ROOT}/wrappers
|
178 |
+
COPY --from=builder_global ${LAMBDA_TASK_ROOT}/samgis-lisa-on-cuda/scripts ${LAMBDA_TASK_ROOT}/scripts
|
|
|
179 |
RUN chmod +x ${LAMBDA_TASK_ROOT}/scripts/entrypoint.sh
|
180 |
RUN chmod +x ${LAMBDA_TASK_ROOT}/scripts/docker_entrypoint.sh
|
181 |
RUN ls -l ${LAMBDA_TASK_ROOT}/scripts/entrypoint.sh ${LAMBDA_TASK_ROOT}/scripts/docker_entrypoint.sh
|
|
|
183 |
RUN ls -l /usr/bin/which
|
184 |
RUN /usr/bin/which python
|
185 |
RUN python --version
|
186 |
+
RUN node --version
|
187 |
+
RUN npm --version
|
188 |
RUN echo "PYTHONPATH: ${PYTHONPATH}."
|
189 |
RUN echo "PATH: ${PATH}."
|
190 |
RUN echo "LAMBDA_TASK_ROOT: ${LAMBDA_TASK_ROOT}."
|
dockerfiles/apt_preferences_ubuntu
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Explanation: Uninstall or do not install any Debian-originated
|
2 |
+
Explanation: package versions other than those in the stable distro
|
3 |
+
Package: *
|
4 |
+
Pin: release a=stable
|
5 |
+
Pin-Priority: 900
|
6 |
+
|
7 |
+
Package: zlib1g
|
8 |
+
Pin: release a=noble
|
9 |
+
Pin-Priority: -10
|
dockerfiles/ubuntu.sources
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
deb http://it.archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse
|
2 |
+
deb-src http://it.archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse
|
3 |
+
|
4 |
+
deb http://security.ubuntu.com/ubuntu jammy-security main universe restricted multiverse
|
5 |
+
deb-src http://security.ubuntu.com/ubuntu jammy-security main universe restricted multiverse
|
6 |
+
|
7 |
+
deb http://it.archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse
|
8 |
+
deb-src http://it.archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse
|
9 |
+
|
10 |
+
|
11 |
+
deb http://it.archive.ubuntu.com/ubuntu/ noble main universe restricted multiverse
|
12 |
+
deb-src http://it.archive.ubuntu.com/ubuntu/ noble main universe restricted multiverse
|
13 |
+
|
14 |
+
deb http://security.ubuntu.com/ubuntu noble-security main universe restricted multiverse
|
15 |
+
deb-src http://security.ubuntu.com/ubuntu noble-security main universe restricted multiverse
|
16 |
+
|
17 |
+
deb http://it.archive.ubuntu.com/ubuntu/ noble-updates main universe restricted multiverse
|
18 |
+
deb-src http://it.archive.ubuntu.com/ubuntu/ noble-updates main universe restricted multiverse
|
pyproject.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
[tool.poetry]
|
2 |
name = "samgis-lisa-on-cuda"
|
3 |
-
version = "1.
|
4 |
description = "A VLM backend for machine learning instance segmentation on geospatial data that uses LISA (Reasoning Segmentation via Large Language Model). This demo uses a dedicated GPU."
|
5 |
authors = ["alessandro trinca tornidor <alessandro@trinca.tornidor.com>"]
|
6 |
license = "MIT license"
|
@@ -9,7 +9,7 @@ package-mode = false
|
|
9 |
|
10 |
[metadata]
|
11 |
name = "samgis-lisa-on-cuda"
|
12 |
-
version = "1.
|
13 |
|
14 |
[tool.poetry.dependencies]
|
15 |
python = ">=3.10,<3.11"
|
|
|
1 |
[tool.poetry]
|
2 |
name = "samgis-lisa-on-cuda"
|
3 |
+
version = "1.6.0"
|
4 |
description = "A VLM backend for machine learning instance segmentation on geospatial data that uses LISA (Reasoning Segmentation via Large Language Model). This demo uses a dedicated GPU."
|
5 |
authors = ["alessandro trinca tornidor <alessandro@trinca.tornidor.com>"]
|
6 |
license = "MIT license"
|
|
|
9 |
|
10 |
[metadata]
|
11 |
name = "samgis-lisa-on-cuda"
|
12 |
+
version = "1.6.0"
|
13 |
|
14 |
[tool.poetry.dependencies]
|
15 |
python = ">=3.10,<3.11"
|