Skip to content
Snippets Groups Projects
build.sh 1.27 KiB
Newer Older
Narayanarao Bhogapurapu's avatar
Narayanarao Bhogapurapu committed
#!/usr/bin/env bash
Narayanarao Bhogapurapu's avatar
Narayanarao Bhogapurapu committed
set -xeuo pipefail

basedir=$(dirname "$(readlink -f "$0")")

start=`date +%s`
apt-get  install  -y nano scons libfftw3-dev libxm4 libmotif-dev python3-dev python3-pip 
apt-get install -y python3-scipy python-opencv python3-numpy python3-h5py cython3 gdal-bin gfortran libgdal-dev python3-gdal libhdf5-dev 
pip3 install cython opencv-python opencv-contrib-python shapely requests
Narayanarao Bhogapurapu's avatar
Narayanarao Bhogapurapu committed

cd home
mkdir pkgs
cd pkgs
git clone https://repo.maap-project.org/bnarayanarao/isce2
cd ~
cd ..
cd ..
cd home/pkgs/
ln -s isce2 isce
cd ..
cd ..
cd home
mkdir .isce
cd ~
cd ..
cp home/pkgs/isce2/infiles_dps/ISCE_config.sh home/pkgs/isce2/
cp home/pkgs/isce2/infiles_dps/read_calibration_slc.py home/pkgs/isce2/contrib/stack/topsStack/
cp home/pkgs/isce2/infiles_dps/SConfigISCE home/.isce/
cd ~
cd ..
cd ..
cd ..
sudo sh -c 'echo "export SCONS_CONFIG_DIR=/home/.isce" >> ~/.bashrc'
sudo sh -c 'echo "export PATH=\"/home/pkgs/isce/contrib/stack/topsStack:\$PATH\" " >> ~/.bashrc'
sudo sh -c 'echo "source /home/pkgs/isce/ISCE_config.sh" >> ~/.bashrc'
alias brc='source ~/.bashrc'

chmod a+x ~/.bashrc
PS1='$ '
source ~/.bashrc
cd ~
cd ..
cd home/pkgs/isce2
scons install

conda deactivate
conda deactivate
conda deactivate

isceApp.py -h
end=`date +%s`
runtime=$((end-start))
echo $runtime 'sec'