Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
let-it-snow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Remote Modules
let-it-snow
Commits
24b2850c
Commit
24b2850c
authored
1 year ago
by
Céline Raillé
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Gitlab-CI migration of the CI/CD pipeline"
parent
7ba06e1a
No related branches found
No related tags found
1 merge request
!109
Resolve "Gitlab-CI migration of the CI/CD pipeline"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+10
-27
10 additions, 27 deletions
Dockerfile
python/s2snow/hillshade.py
+1
-1
1 addition, 1 deletion
python/s2snow/hillshade.py
with
11 additions
and
28 deletions
Dockerfile
+
10
−
27
View file @
24b2850c
...
...
@@ -7,9 +7,7 @@ LABEL org.opencontainers.image.authors="aurore.dupuis@cnes.fr vincent.gaudissart
LABEL
org.opencontainers.image.description="LIS Build container"
# Montage du volume temporaire et utilisation pour apt le site du cnes
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
apt-get update
-y
&&
\
apt-get
install
-y
ca-certificates
...
...
@@ -18,9 +16,7 @@ COPY certs/* /usr/local/share/ca-certificates/
RUN
update-ca-certificates
# Install required packages
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
apt-get update
-y
--quiet
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
--quiet
--yes
--no-install-recommends
\
# basic system installs
...
...
@@ -56,14 +52,11 @@ RUN --mount=type=secret,id=proxy_http_cnes --mount=type=secret,id=proxy_https_cn
&& \
rm -rf /var/lib/apt/lists/*
# Build OTB
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
mkdir
-p
/root/otb-build/build
&&
\
cd
/root/otb-build
&&
\
wget
-q
https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-7.4.1.zip
-O
/tmp/OTB.zip
&&
\
wget
--no-check-certificate
-q
https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-7.4.1.zip
-O
/tmp/OTB.zip
&&
\
unzip /tmp/OTB.zip
&&
\
cd
/root/otb-build/build
&&
\
cmake
\
...
...
@@ -87,9 +80,7 @@ RUN --mount=type=secret,id=proxy_http_cnes --mount=type=secret,id=proxy_https_cn
rm
-rf
/root/otb-build /tmp/OTB.zip
# Build wxWidgets
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
mkdir
-p
/root/wxwidgets-build/
&&
\
cd
/root/wxwidgets-build
&&
\
git clone
--branch
v3.2.2 https://github.com/wxWidgets/wxWidgets.git
&&
\
...
...
@@ -101,9 +92,7 @@ RUN --mount=type=secret,id=proxy_http_cnes --mount=type=secret,id=proxy_https_cn
make
install
-j4
# Build saga-gis
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
mkdir
-p
/root/saga-gis-build/
&&
\
cd
/root/saga-gis-build
&&
\
git clone
--branch
saga-8.4.2 https://github.com/saga-gis/saga-gis.git
&&
\
...
...
@@ -123,12 +112,10 @@ RUN ln -s /usr/bin/python3 /usr/bin/python && \
chmod
a+x /install/lis/app/
*
# Build DANS-GDAL scripts
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
mkdir
-p
/root/dans-build
&&
\
cd
/root/dans-build
&&
\
wget
-q
https://github.com/gina-alaska/dans-gdal-scripts/archive/refs/heads/master.zip
-O
/tmp/dans.zip
&&
\
wget
--no-check-certificate
-q
https://github.com/gina-alaska/dans-gdal-scripts/archive/refs/heads/master.zip
-O
/tmp/dans.zip
&&
\
unzip /tmp/dans.zip
&&
\
cd
dans-gdal-scripts-master
&&
\
./autogen.sh
&&
\
...
...
@@ -146,9 +133,7 @@ LABEL org.opencontainers.image.authors="aurore.dupuis@cnes.fr vincent.gaudissart
LABEL
org.opencontainers.image.description="LIS + OTB 7.4 Container"
# system packages
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
apt-get update
--quiet
&&
\
apt-get
-y
upgrade
--quiet
&&
\
DEBIAN_FRONTEND
=
noninteractive apt-get
install
--quiet
--yes
--no-install-recommends
\
...
...
@@ -197,9 +182,7 @@ RUN mv /usr/local/lib/otbapp_* /usr/local/lib/otb/applications/
COPY
--from=builder /install/dans /usr/local
# Add additionnal dependancies
RUN
--mount
=
type
=
secret,id
=
proxy_http_cnes
--mount
=
type
=
secret,id
=
proxy_https_cnes
\
export
http_proxy
=
$(
cat
/run/secrets/proxy_http_cnes
)
&&
\
export
https_proxy
=
$(
cat
/run/secrets/proxy_https_cnes
)
&&
\
RUN if
[
-f
"/kaniko/run/secrets/http_proxy"
]
;
then
export
http_proxy
=
$(
cat
/kaniko/run/secrets/http_proxy
)
;
export
https_proxy
=
$(
cat
/kaniko/run/secrets/https_proxy
)
;
fi
&&
\
pip3
install
\
--trusted-host
pypi.org
--trusted-host
pypi.python.org
--trusted-host
files.pythonhosted.org
\
--no-cache-dir
\
...
...
This diff is collapsed.
Click to expand it.
python/s2snow/hillshade.py
+
1
−
1
View file @
24b2850c
...
...
@@ -2,12 +2,12 @@ import logging
import
os
from
datetime
import
datetime
,
timedelta
import
numpy
as
np
import
saga_api
from
lxml
import
etree
from
osgeo
import
gdal
,
osr
from
s2snow.lis_constant
import
AZIMUTH_PATH
,
ZENITH_PATH
from
s2snow.lis_exception
import
UnknownProductException
from
s2snow.otb_wrappers
import
band_math
import
saga_api
"""
This scripts compute the hillshade from a DEM and a Sentinel2 Metadata file containing the sun angles.
...
...
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