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

[Help]: Cloud computing space other than Colab #111

Open
mostafadazi opened this issue Mar 12, 2024 · 5 comments
Open

[Help]: Cloud computing space other than Colab #111

mostafadazi opened this issue Mar 12, 2024 · 5 comments

Comments

@mostafadazi
Copy link

mostafadazi commented Mar 12, 2024

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 mostafadazi changed the title [Help]: [Help]: Cloud computing space other than Colab Mar 12, 2024
@AlexeyPechnikov
Copy link
Owner

  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.

@mostafadazi
Copy link
Author

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 e98ebc0 > /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

@AlexeyPechnikov
Copy link
Owner

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

@mostafadazi
Copy link
Author

Unfortunately, it does not support the sudo command

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

@AlexeyPechnikov
Copy link
Owner

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.

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

No branches or pull requests

2 participants