Enhancement: Non-interactive installation of esa-snap_sentinel_unix_2_0_2.sh

What I want to do:
I am setting up a number of Docker containers so as to have an isolated processing environment for testing different snap versions and configurations, as well as deploy on cloud instances and develop work-flows in isolated environments with partners. At present, these are headless containers which use the command-line program gpt.

Problem:
esa-snap_sentinel_unix_2_0_2.sh is interactive and the mechanism for passing installation options is either not available or not documented. This means the Docker container also has to be generated ‘interactively’, this works fine, however it goes against the principle of providing a single transparent set of instructions (Dockerfile) to automatically build the container. This issue was previously brought up in this unanswered question: Non-interactive installation of SNAP under Ubuntu 14.04 into a given folder . I guess it is relevant to general cases where users wish to remotely deploy snap using automation.

Proposed solution:
As Unix is likely to be the OS of choice for headless, remote deployment of snap containers it would be very useful to provide documentation with esa-snap_sentinel_unix_2_0_2.sh describing the mechanism for passing installation options via the command line. In this README you might also include instructions for ensuring all of the paths needed by snap are in the PATH variable and why/how to manually edit gpt.vmoptions (will take up these issues in another thread).

Will write up and place the Docker instructions on Github shortly, cheers Ed.

Hello Ed,
interesting work you are doing. Looking forward to see the results.
However, I’ve wrote some documentation in our wiki regarding the console and unattended installation modes.
It’s a brief documentation and points further to the help of install4j. But I think it will be helpful.

Hi both,

so it works again since SNAP 2.0 using the -q flag: i.e. sh snap_unix_bla.sh -q

What does not work, at least when I tried the last time, is the automated updating, which would be useful as well.
i.e. snap --modules --update-all --no-splash
First of all it did not update anything, and again it will start the GUI of snap, which is not always wanted.
Any idea how to avoid it?

Best,
Andreas

The correct command to update all modules is:

snap --nosplash --nogui --modules --update-all

To get a list of all modules and see if an update is available you can call:

snap --nosplash --nogui --modules --list --refresh

In order to update a certain module call:

snap --nosplash --nogui --list --modules --update org.esa.snap.snap.ndvi

Ok, so I missed the nogui option. Thanks for the fast reply.
Best,
Andreas

Yes, and also the one dash ‘-’ in no-splash was to much. Just nosplash.

Also added a wiki page regarding this topic.

That’s great! Many thanks.

Excellent, thanks for the rapid response, that is exactly the information needed.

From a quick look at the wiki docs it should now be easy to make a transparent Dockerfile for sharing. In the next few days will update with this latest information and add to https://github.com/edwardpmorris/docker-snap (a-work-in-progress)