pygmtsar icon indicating copy to clipboard operation
pygmtsar copied to clipboard

[Help]: Cloud computing space other than Colab

Open mostafadazi opened this issue 11 months ago • 5 comments

Hi, I have a few questions.

  1. First question: Can this code be executed in an Cloud environment other than Colab?
  2. Is it possible to install the library with pip command and use all its features? 3 ) When I use this part of the code (sbas.load_dem(DEM, roi), I encounter such an error FileNotFoundError: [Errno 2] No such file or directory: 'gmtsar_sharedir.csh'

mostafadazi avatar Mar 12 '24 17:03 mostafadazi

  1. Yes, sure, any Linux or MacOS platform supported but installation scripts available for Linux Ubuntu and MacOS only.
  2. You need to install GMTSAR binaries for Sentinel-1 data preprocessing and SNAPHU unwrapper.

AlexeyPechnikov avatar Mar 15 '24 12:03 AlexeyPechnikov

Thank you for your response.

Do you think it's possible to use Microsoft Azure? https://planetarycomputer.microsoft.com/ No matter how hard I've tried to execute the code in this environment, I couldn't succeed. And I'm facing this error. I used this part of the code to install gmtsar, but encountering this error:

count = !ls /usr/local | grep GMTSAR | wc -l if count == ['0']: !export DEBIAN_FRONTEND=noninteractive !apt-get update > /dev/null !apt install -y csh autoconf gfortran
libtiff5-dev libhdf5-dev liblapack-dev libgmt-dev gmt-dcw gmt-gshhg gmt > /dev/null # GMTSAR codes are not so good to be compiled by modern GCC !apt install gcc-9 > /dev/null !update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10 !update-alternatives --config gcc !gcc --version | head -n 1 !rm -fr /usr/local/GMTSAR !git config --global advice.detachedHead false !cd /usr/local && git clone -q --branch master https://github.com/gmtsar/gmtsar GMTSAR # revert recent broken commit !cd /usr/local/GMTSAR && git checkout e98ebc0f4164939a4780b1534bac186924d7c998 > /dev/null !cd /usr/local/GMTSAR && autoconf > /dev/null !cd /usr/local/GMTSAR && ./configure --with-orbits-dir=/tmp > /dev/null !cd /usr/local/GMTSAR && make 1>/dev/null 2>/dev/null !cd /usr/local/GMTSAR && make install >/dev/null # fix for missed script, use bash instead of csh interpretator # note: csh messes stdout and stderr in Docker environment, it's resolved in PyGMTSAR code !echo '#!/bin/sh' > /usr/local/GMTSAR/bin/gmtsar_sharedir.csh !echo echo /usr/local/GMTSAR/share/gmtsar >> /usr/local/GMTSAR/bin/gmtsar_sharedir.csh !chmod a+x /usr/local/GMTSAR/bin/gmtsar_sharedir.csh !/usr/local/GMTSAR/bin/gmtsar_sharedir.csh # test one GMTSAR binary !/usr/local/GMTSAR/bin/make_s1a_tops 2>&1 | head -n 2

error:

E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? update-alternatives: error: alternative path /usr/bin/gcc-9 doesn't exist update-alternatives: error: no alternatives for gcc /bin/bash: line 1: gcc: command not found fatal: could not create work tree dir 'GMTSAR': Permission denied /bin/bash: line 1: cd: /usr/local/GMTSAR: No such file or directory /bin/bash: line 1: cd: /usr/local/GMTSAR: No such file or directory /bin/bash: line 1: cd: /usr/local/GMTSAR: No such file or directory /bin/bash: line 1: cd: /usr/local/GMTSAR: No such file or directory /bin/bash: line 1: cd: /usr/local/GMTSAR: No such file or directory /bin/bash: line 1: /usr/local/GMTSAR/bin/gmtsar_sharedir.csh: No such file or directory /bin/bash: line 1: /usr/local/GMTSAR/bin/gmtsar_sharedir.csh: No such file or directory chmod: cannot access '/usr/local/GMTSAR/bin/gmtsar_sharedir.csh': No such file or directory /bin/bash: line 1: /usr/local/GMTSAR/bin/gmtsar_sharedir.csh: No such file or directory /bin/bash: line 1: /usr/local/GMTSAR/bin/make_s1a_tops: No such file or directory

mostafadazi avatar Mar 16 '24 07:03 mostafadazi

The errors mean you do not have the required root access to install software. Try using 'sudo' without a password before each command.

AlexeyPechnikov avatar Mar 16 '24 08:03 AlexeyPechnikov

Unfortunately, it does not support the sudo command

/bin/bash: line 1: sudo: command not found

mostafadazi avatar Mar 16 '24 08:03 mostafadazi

In this case, you do not have the ability to install any software. You might consider using paid Azure services where root access is granted.

AlexeyPechnikov avatar Mar 16 '24 08:03 AlexeyPechnikov