-
Notifications
You must be signed in to change notification settings - Fork 24
/
install_code.bash
executable file
·91 lines (75 loc) · 4.16 KB
/
install_code.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env bash
set -eo pipefail
### Source the environment #################
export RSMASINSAR_HOME=$PWD
source setup/platforms_defaults.bash;
source setup/environment.bash;
### Install basic code and c-dependencies (isce fails on Mac) ###
mamba install python=3.10 wget git tree numpy --yes
pip install bypy
if [[ "$(uname)" == "Darwin" ]]; then
mamba install mintpy --yes
else
mamba install isce2 mintpy --yes
fi
mamba install numpy pandas xarray netcdf4 packaging gmt pygmt --yes
### git clone the code #################
git clone git@github.com:insarlab/MintPy.git tools/MintPy
git clone git@github.com:insarlab/MiaplPy.git tools/MiaplPy
git clone git@github.com:geodesymiami/insarmaps_scripts.git tools/insarmaps_scripts
git clone git@github.com:geodesymiami/insarmaps.git tools/insarmaps
git clone git@github.com:isce-framework/isce2.git tools/isce2
git clone git@github.com:geodesymiami/MimtPy.git tools/MimtPy
git clone git@github.com:geodesymiami/geodmod.git tools/geodmod
git clone git@github.com:geodesymiami/SSARA.git tools/SSARA
git clone git@github.com:TACC/launcher.git tools/launcher
git clone git@github.com:geodesymiami/PlotData tools/PlotData
git clone git@github.com:geodesymiami/precip tools/Precip
git clone git@github.com:geodesymiami/precip_web tools/Precip_web
git clone git@github.com:geodesymiami/precip_cron tools/Precip_cron
git clone git@github.com:scottstanie/sardem tools/sardem
git clone git@github.com:luhipi/sarvey tools/sarvey
git clone git@github.com:falkamelung/MintPy.git tools/MintPy_falk
mamba install python=3.10 --file minsar/environment.yml --yes -c conda-forge # first install c-code
mamba install --file tools/insarmaps_scripts/environment.yml -c conda-forge
### Install python code and dependencies ########
pip install -e tools/MintPy
pip install -e tools/MiaplPy
pip install -r minsar/requirements.txt
pip install -r tools/insarmaps_scripts/requirements.txt
pip install -r tools/PlotData/requirements.txt
pip install -r tools/Precip/requirements.txt
pip install -r tools/sardem/requirements.txt
pip install -e tools/sardem
pip install tools/sarvey
### Reduce miniforge3 directory size #################
rm -rf tools/miniforge3/pkgs
### Install credential files ###############
#setup/install_credential_files.bash;
### Install SNAPHU #################
wget --no-check-certificate https://web.stanford.edu/group/radar/softwareandlinks/sw/snaphu/snaphu-v2.0.5.tar.gz -P tools
tar -xvf tools/snaphu-v2.0.5.tar.gz -C tools
perl -pi -e 's/\/usr\/local/\$(PWD)\/snaphu-v2.0.5/g' tools/snaphu-v2.0.5/src/Makefile
cc=tools/miniforge3/bin/cc
make -C tools/snaphu-v2.0.5/src
### Adding not-commited MintPy fixes
cp -p minsar/additions/mintpy/save_hdfeos5.py tools/MintPy/src/mintpy/
cp -p minsar/additions/mintpy/cli/save_hdfeos5.py tools/MintPy/src/mintpy/cli/
### Adding MiaplPy fix which Sara says she is going to fix
cp -p minsar/additions/miaplpy/prep_slc_isce.py tools/MiaplPy/src/miaplpy
### Adding ISCE fixes and copying checked-out ISCE version (the latest) into miniforge directory ###
cp -p minsar/additions/isce/logging.conf tools/miniforge3/lib/python3.?/site-packages/isce/defaults/logging/logging.conf
cp -p minsar/additions/isce2/topsStack/FilterAndCoherence.py tools/isce2/contrib/stack/topsStack
cp -p minsar/additions/isce2/stripmapStack/prepRawCSK.py tools/isce2/contrib/stack/stripmapStack
cp -p minsar/additions/isce2/stripmapStack/unpackFrame_TSX.py tools/isce2/contrib/stack/stripmapStack
cp -p minsar/additions/isce2/DemStitcher.py tools/isce2/contrib/demUtils/demstitcher
### Copying ISCE fixes into miniforge directory ###
cp -r tools/isce2/contrib/stack/* tools/miniforge3/share/isce2
cp -r tools/isce2/components/isceobj/Sensor/TOPS tools/miniforge3/share/isce2
cp tools/isce2/components/isceobj/Sensor/TOPS/TOPSSwathSLCProduct.py tools/miniforge3/lib/python3.?/site-packages/isce/components/isceobj/Sensor/TOPS
cp tools/isce2/contrib/demUtils/demstitcher/DemStitcher.py tools/miniforge3/lib/python3.??/site-packages/isce/components/contrib/demUtils
### Create orbits and aux directories
echo "mkdir -p $SENTINEL_ORBITS $SENTINEL_AUX"
mkdir -p $SENTINEL_ORBITS $SENTINEL_AUX
ls -d $SENTINEL_ORBITS $SENTINEL_AUX
echo "Installation DONE"