EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
6e4e6756
Commit
6e4e6756
authored
4 years ago
by
Fabian Schindler
Browse files
Options
Downloads
Patches
Plain Diff
preprocessor: adding entrypoint
switching to ubuntu based base image small fixes
parent
86d82f31
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
preprocessor/Dockerfile
+9
-7
9 additions, 7 deletions
preprocessor/Dockerfile
preprocessor/entrypoint.sh
+11
-0
11 additions, 0 deletions
preprocessor/entrypoint.sh
preprocessor/preprocessor.py
+3
-3
3 additions, 3 deletions
preprocessor/preprocessor.py
with
23 additions
and
10 deletions
preprocessor/Dockerfile
+
9
−
7
View file @
6e4e6756
...
...
@@ -25,7 +25,7 @@
# IN THE SOFTWARE.
#-----------------------------------------------------------------------------
FROM
osgeo/gdal:
alpine-nor
mal-latest
FROM
osgeo/gdal:
ubuntu-s
mal
l
-latest
MAINTAINER
EOX
LABEL
name="prism view server preprocessor" \
vendor="EOX IT Services GmbH <https://eox.at>" \
...
...
@@ -35,9 +35,11 @@ LABEL name="prism view server preprocessor" \
USER
root
RUN
apk add
--no-cache
gcc py3-pip python3-dev py3-setuptools musl-dev
\
linux-headers py3-redis
&&
\
pip3
install
python-keystoneclient python-swiftclient argparse
RUN
apt
install
-y
\
python3-redis python3-keystoneclient python3-swiftclient wait-for-it
&&
\
apt autoremove
-y
&&
\
apt clean
&&
\
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
ENV
INSTANCE_ID="prism-data-access-server_preprocessor" \
COLLECTION= \
...
...
@@ -64,12 +66,12 @@ ADD run-preprocessor.sh \
preprocessor.py \
get_min_max.py \
transform_chain.py \
entrypoint.sh \
/
RUN
chmod
-v
+x
\
/run-preprocessor.sh
\
/preprocessor.py
\
/get_min_max.py
\
/transform_chain.py
/entrypoint.sh
ENTRYPOINT
["/entrypoint.sh"]
CMD
["/run-preprocessor.sh"]
This diff is collapsed.
Click to expand it.
preprocessor/entrypoint.sh
0 → 100644
+
11
−
0
View file @
6e4e6756
#!/bin/bash -e
SERVICES
=
${
WAIT_SERVICES
:
=
''
}
if
[[
!
-z
$SERVICES
]]
;
then
for
service
in
$SERVICES
;
do
wait-for-it
$service
done
fi
eval
"
$@
"
This diff is collapsed.
Click to expand it.
preprocessor/preprocessor.py
+
3
−
3
View file @
6e4e6756
...
...
@@ -146,14 +146,14 @@ def preprocessor(
m
for
m
in
tf
.
getmembers
()
if
m
is
not
None
and
re
.
search
(
r
"
GSC.+\.xml
"
,
m
.
name
,
re
.
IGNORECASE
)
)
world_files_ti
=
[
m
for
m
in
tf
.
getmembers
()
if
m
is
not
None
and
m
for
m
in
tf
.
getmembers
()
if
m
is
not
None
and
re
.
search
(
r
"
RPC.+\.xml
"
,
m
.
name
,
re
.
IGNORECASE
)
]
# add J2W files only if more than one files are present
# that signalizes that file was split into multiple or has panchromatic
if
len
(
data_files_ti
)
>
1
:
world_files_ti
+=
[
m
for
m
in
tf
.
getmembers
()
if
m
is
not
None
and
m
for
m
in
tf
.
getmembers
()
if
m
is
not
None
and
re
.
search
(
r
"
.+\.J2W
"
,
m
.
name
,
re
.
IGNORECASE
)
]
data_files
=
[
...
...
@@ -380,7 +380,7 @@ if __name__ == "__main__":
setup_logging
(
arg_values
.
verbosity
)
collection
=
os
.
environ
.
get
(
'
C
ollection
'
)
collection
=
os
.
environ
.
get
(
'
C
OLLECTION
'
)
if
collection
is
None
:
logger
.
critical
(
"
Collection environment variable not set.
"
)
sys
.
exit
(
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment