I’d like to automate installation of a couple of *.nbm plugins on existing SNAP installations. Installation of these plugins using the UI works fine.
I tried using the cmd line tool:
[root@daemsd bin]# ./snap --modules --install /opt/vito/icor/sta/iCOR-landsat8-sta-1.0.0-LINUX.nbm
Cannot install. No match for [/opt/vito/icor/sta/iCOR-landsat8-sta-1.0.0-LINUX.nbm].
This doesn’t seem to work, but maybe this is not the right approach?
The windows error looks a bit different since snap is getting “null” rather than the file path, but I’m having the same issue as OP. Any ideas are welcomed.
[root@server ~]# /opt/snap/5.0.0/bin/snap --nosplash --nogui --modules --install /root/s3tbx-c2rcc-0.18-SNAPSHOT.nbm
/opt/snap/5.0.0/bin/../platform/lib/nbexec: WARNING: environment variable DISPLAY is not set
Cannot install. No match for [/root/s3tbx-c2rcc-0.18-SNAPSHOT.nbm].
The installation of an additional module is still not working.
But there are other ways.
If you have developed the extension and build it on your own, then you can use the cluster which is generated during the build process.
I just wrote a brief guide how it can be done. Adding an external module cluster to SNAP
The guide might not yet be complete and maybe contains some errors, as I just quickly wrote it down. Let me know if you struggle with it.
As a note for using SNAP in a docker. The property where auxdata (DEM, land-water mask, etc.) is stored should be configured. Usually, this data is downloaded on demand and stored in the user directory.
When using docker this directory is cleaned with every start and the data needs to be downloaded again.
In the file snap.auxdata.properties the property AuxDataPath should be set to some location outside of the docker container.
I also had to install unmanaged third-party *.nbm plugins on an Ubuntu were I had only a command line at hand. So I ended up just unzipping the *.nbm file and copying the the content of /netbeans/ to ~/.snap/system. This worked just fine for the few plugins I installed this way.