Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Fix SNAP 7.0 + Python 3 support #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whatnick
Copy link

This is a hands on experiment in getting SNAP installed via Docker. If it works nicely the PR will be marked for review.

@schwankner
Copy link
Owner

hey cool! let me know when you are ready!

@ciaransweet
Copy link

@whatnick @schwankner I'd be interested to see where this has gotten to.

I'm also trying to dockerise snappy with Python 3.6, having no luck, hitting:

Please check the log file '/root/.snap/snap-python/snappy/snappyutil.log'.
        at org.esa.snap.python.PyBridge.configureJpy(PyBridge.java:232)
        at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:149)
        at org.esa.snap.rcp.cli.SnapArgsProcessor.processPython(SnapArgsProcessor.java:103)
        at org.esa.snap.rcp.cli.SnapArgsProcessor.process(SnapArgsProcessor.java:49)
        at org.netbeans.modules.sendopts.DefaultProcessor.process(DefaultProcessor.java:202)
        at org.netbeans.spi.sendopts.Option$1.process(Option.java:387)
        at org.netbeans.api.sendopts.CommandLine.process(CommandLine.java:317)
        at org.netbeans.modules.sendopts.HandlerImpl.execute(HandlerImpl.java:62)
        at org.netbeans.modules.sendopts.Handler.cli(Handler.java:69)
        at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
        at org.netbeans.core.startup.CLICoreBridge.cli(CLICoreBridge.java:82)
        at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
        at org.netbeans.CLIHandler$1.exec(CLIHandler.java:268)
        at org.netbeans.CLIHandler.finishInitialization(CLIHandler.java:447)
        at org.netbeans.MainImpl.finishInitialization(MainImpl.java:256)
        at org.netbeans.Main.finishInitialization(Main.java:92)
        at org.netbeans.core.startup.Main.start(Main.java:316)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
        at java.lang.Thread.run(Thread.java:748)
Python configuration error: Python configuration failed.
Command [/usr/bin/python3.6 ./snappyutil.py --snap_home /usr/local/snap --java_module /usr/local/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 8G --java_home /usr/local/snap/jre --req_arch amd64]
failed with return code 30.
Please check the log file '/root/.snap/snap-python/snappy/snappyutil.log'.

If you've managed to get Python 3 working, I'd love to know!

@ciaransweet
Copy link

For reference, my Dockerfile currently looks like:

FROM ubuntu:bionic-20200311

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
    apt-get install -y git gcc libssl-dev make openjdk-8-jdk wget zlib1g-dev \
    build-essential libssl-dev zlib1g-dev libbz2-dev \
    libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
    xz-utils tk-dev libffi-dev liblzma-dev python-openssl git python3-distutils

ENV JDK_HOME /usr/lib/jvm/java-8-openjdk-amd64/
ENV JAVA_HOME $JDK_HOME

RUN apt-get install -y python3.6

COPY response.varfile .
RUN wget http://step.esa.int/downloads/7.0/installers/esa-snap_sentinel_unix_7_0.sh
RUN chmod +x esa-snap_sentinel_unix_7_0.sh
RUN ./esa-snap_sentinel_unix_7_0.sh -q
RUN ln -s /usr/local/snap/bin/gpt /usr/bin/gpt


RUN /usr/local/snap/bin/snappy-conf $(which python)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants