-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathOpenEO_Dockerfile
More file actions
97 lines (79 loc) · 3.48 KB
/
OpenEO_Dockerfile
File metadata and controls
97 lines (79 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# docker build -t openeo_insar:1.56 . -f OpenEO_Dockerfile
# docker run -it --memory=15G -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --rm openeo_insar:1.56
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.10.0
LABEL description="The main aim of the CLOUDInSAR project is to develop an open-source, cloud-based solution for processing and analyzing Sentinel-1 InSAR data."
LABEL authors="Michele Claus, Emile Sonneveld"
LABEL maintainer="michele.claus@eurac.edu, emile.sonneveld@vito.be"
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive \
LC_ALL=C.UTF-8 \
LANG=C.UTF-8
# Install necessary packages
RUN apt-get -qq update && \
apt-get -qq install -y \
jq \
xmlstarlet \
zip \
default-jre \
bc \
nano \
wget \
curl \
parallel \
dpkg \
software-properties-common && \
rm -rf /var/lib/apt/lists/*
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get -qq update && \
apt-get -qq install -y \
build-essential \
git \
python3.11 python3.11-distutils python3.11-dev python3.11-venv \
cmake \
autoconf \
libgfortran5
# Download and install jacksum and s5cmd
RUN curl -sL -O 'https://s3.waw3-2.cloudferro.com/swift/v1/jacksum/jacksum_1.7.0-4.1_all.deb' && \
dpkg -i jacksum_1.7.0-4.1_all.deb && rm jacksum_1.7.0-4.1_all.deb && \
curl -sL -O 'https://github.com/peak/s5cmd/releases/download/v2.2.2/s5cmd_2.2.2_linux_amd64.deb' && \
dpkg -i s5cmd_2.2.2_linux_amd64.deb && rm s5cmd_2.2.2_linux_amd64.deb
#COPY ./utilities /src/utilities/ # Copy at the end of file to avoid slow rebuilds
ENV PATH="${PATH}:/src/utilities/"
### Install esa-snap ###
ENV SNAPVER=12
RUN mkdir -p /src/esa-snap-docker
COPY response.varfile /src/esa-snap-docker/response.varfile
# install and update snap
RUN wget -q -O /src/esa-snap-docker/esa-snap_all_unix_${SNAPVER}_0_0.sh "https://step.esa.int/downloads/${SNAPVER}.0/installers/esa-snap_all_linux-${SNAPVER}.0.0.sh" && \
sh /src/esa-snap-docker/esa-snap_all_unix_${SNAPVER}_0_0.sh -q -varfile /src/esa-snap-docker/response.varfile && \
rm -f /src/esa-snap-docker/esa-snap_all_unix_${SNAPVER}_0_0.sh
# update SNAP
COPY update_snap.sh /src/esa-snap-docker/update_snap.sh
RUN bash /src/esa-snap-docker/update_snap.sh
# add gpt to PATH
ENV PATH="${PATH}:/usr/local/esa-snap/bin"
# . /opt/venv/bin/activate -> has no effect in Docker, here we need the following line:
ENV PATH="/opt/venv/bin:$PATH"
RUN python3.11 -m venv /opt/venv && \
cd /src && \
mkdir -p sar && \
pip config set global.disable-pip-version-check true
RUN cd /opt && \
git clone --recursive --shallow-submodules --depth 1 https://github.com/Open-EO/openeo-python-driver.git && \
python3 -m pip install -e /opt/openeo-python-driver
COPY pyproject.toml /src/pyproject.toml
RUN cd /src && \
python3 -m pip install -q -e . && \
python3 -m pip install -q --config-settings="--build-option=build_ext" --config-settings="--build-option=-I/usr/include/gdal" GDAL==`gdal-config --version`
ENV PATH="${PATH}:/src/"
RUN wget https://step.esa.int/thirdparties/snaphu/2.0.4/snaphu-v2.0.4_linux.zip && \
unzip -q -d /opt snaphu-v2.0.4_linux.zip && \
chmod +x /opt/snaphu-v2.0.4_linux/bin/snaphu && \
rm snaphu-v2.0.4_linux.zip
ENV PATH="$PATH:/opt/snaphu-v2.0.4_linux/bin"
# COPY . /src
COPY ./utilities /src/utilities/
COPY ./snap_graphs/ /src/snap_graphs/
COPY ./sar /src/sar/
COPY *.sh /src/
WORKDIR /src