Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNAP update to version 10 #41

Open
wants to merge 11 commits into
base: s1tbx
Choose a base branch
from
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.18 as base

RUN apk add openjdk8
RUN apk add openjdk11


FROM base as build
Expand All @@ -25,7 +25,7 @@ ENV PACKAGES="\
fontconfig \
gcompat \
libgfortran \
openjdk8 \
openjdk11 \
python3 \
vim \
ttf-dejavu \
Expand All @@ -40,18 +40,18 @@ RUN echo "Install dependencies and tools";\

ENV LC_ALL "en_US.UTF-8"
# SNAP wants the current folder '.' included in LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH ".:/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/server/:$LD_LIBRARY_PATH"
ENV LD_LIBRARY_PATH ".:/usr/lib/jvm/java-11-openjdk/jre/lib/server/:$LD_LIBRARY_PATH"

# install SNAPPY
ENV JAVA_HOME "/usr/lib/jvm/java-1.8-openjdk"
ENV JAVA_HOME "/usr/lib/jvm/java-11-openjdk"

COPY snap /src/snap
RUN sh /src/snap/install.sh


FROM base as snappy

RUN apk add openjdk8 python3 ttf-dejavu
RUN apk add openjdk11 python3 ttf-dejavu
ENV LD_LIBRARY_PATH ".:$LD_LIBRARY_PATH"
COPY --from=build /root/.snap /root/.snap
COPY --from=build /usr/local/snap /usr/local/snap
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,15 @@ See there for related instructions.

## Alpine dev stuff

Alternatively, a build approach was tried out. Kept here if needed further.
As the stable SNAP version 7.0.2 needs maven 3.6.0 (while alpine offers 3.6.3), so SNAP 8 was built for testing.
Alternatively, we have built it on Alpine Linux. Kept here if needed further.
mmacata marked this conversation as resolved.
Show resolved Hide resolved

```
FROM alpine:edge

<!-- ARG SNAP_ENGINE_TAG=8.0.0 -->
ENV JAVA_HOME "/usr/lib/jvm/java-1.8-openjdk"
<!-- ARG SNAP_ENGINE_TAG=10.0.0 -->
ENV JAVA_HOME "/usr/lib/jvm/java-11-openjdk"

RUN apk add git openjdk8 maven
RUN apk add git openjdk11 maven
RUN git clone https://github.com/senbox-org/snap-engine.git /src/snap/snap-engine
WORKDIR /src/snap/snap-engine
<!-- RUN git checkout $SNAP_ENGINE_TAG -->
Expand Down
4 changes: 2 additions & 2 deletions snap/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# https://senbox.atlassian.net/wiki/spaces/SNAP/pages/30539785/Update+SNAP+from+the+command+line
# http://step.esa.int/main/download/snap-download/

SNAPVER=9
SNAPVER=10
# avoid NullPointer crash during S-1 processing
java_max_mem=10G

# install and update snap
wget -q -O /src/snap/esa-snap_all_unix_${SNAPVER}_0_0.sh \
"http://step.esa.int/downloads/${SNAPVER}.0/installers/esa-snap_all_unix_${SNAPVER}_0_0.sh"
"https://step.esa.int/downloads/${SNAPVER}.0/installers/esa-snap_all_linux-${SNAPVER}.0.0.sh"

# # hack to make it run on alpine
sh /src/snap/esa-snap_all_unix_${SNAPVER}_0_0.sh -q -varfile /src/snap/response.varfile
Expand Down