forked from AlignSAR/alignSAR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerFile
More file actions
58 lines (55 loc) · 4.09 KB
/
DockerFile
File metadata and controls
58 lines (55 loc) · 4.09 KB
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
FROM ubuntu:22.04
USER root
ENV PATH=/opt/miniconda/bin:/opt/miniconda/envs/py39/bin:/opt/snap/bin:$PATH
RUN apt-get update && apt-get install -y wget libgfortran5 libfftw3-dev fonts-dejavu openjdk-8-jre curl jq vim git && \
apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -LO "http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" && \
bash Miniconda3-latest-Linux-x86_64.sh -p /opt/miniconda -b && \
rm Miniconda3-latest-Linux-x86_64.sh
RUN conda update -c conda-forge -y conda && \
conda create -n py39 -c conda-forge python=3.9 pip mamba
# install isce2 # decided not needed here
# mamba install -c conda-forge -y isce2 && \
# install LiCSBAS \
RUN cd /opt && git clone https://github.com/comet-licsar/LiCSBAS && \
mamba install -c conda-forge -y --file LiCSBAS/LiCSBAS_requirements.txt && \
echo "export PATH=\$PATH:/opt/LiCSBAS/bin" >> ~/.bashrc && \
echo "export PYTHONPATH=\$PYTHONPATH:/opt/LiCSBAS/LiCSBAS_lib" >> ~/.bashrc
# install LiCSAR_proc
RUN git clone https://github.com/comet-licsar/licsar_proc && \
mamba install -c conda-forge -y --file licsar_proc/requirements.txt && \
mamba install -c conda-forge -y gmt && \
LiCSARpath="/opt/licsar_proc" && \
echo "export LiCSARpath=/opt/licsar_proc" >> ~/.bashrc && \
echo "export PATH=\$PATH:\$LiCSARpath/bin:\$LiCSARpath/bin/orig:\$LiCSARpath/bin/scripts:\$LiCSARpath/python" >> ~/.bashrc && \
echo "export PYTHONPATH=\$PYTHONPATH:\$LiCSARpath/python:\$LiCSARpath/python/LiCSAR_lib:\$LiCSARpath/python/LiCSAR_db" >> ~/.bashrc && \
echo "source activate py39" >> ~/.bashrc
# install alignSAR scripts (and set paths and variables)
RUN git clone https://github.com/AlignSAR/alignSAR.git && \
cat /opt/alignSAR/bashrc_alignsar >> ~/.bashrc
# install snaphu
RUN apt-get update && apt-get install -y build-essential && \
wget https://web.stanford.edu/group/radar/softwareandlinks/sw/snaphu/snaphu-v2.0.5.tar.gz && tar -xzf snaphu-v2.0.5.tar.gz && rm snaphu-v2.0.5.tar.gz && \
cd snaphu-v2.0.5/src && make -f Makefile && mkdir -p /usr/local/man/man1 && make install && cd
## Installing SNAP9
ENV \
URL="http://step.esa.int/downloads/9.0/installers" \
TBX="esa-snap_sentinel_unix_9_0_0.sh"
RUN echo -e "deleteAllSnapEngineDir\$Boolean=false\ndeleteOnlySnapDesktopDir\$Boolean=false\nexecuteLauncherWithPythonAction\$Boolean=false\nforcePython\$Boolean=false\npythonExecutable=/usr/bin/python\nsys.adminRights\$Boolean=true\nsys.component.RSTB\$Boolean=false\nsys.component.S1TBX\$Boolean=true\nsys.component.S2TBX\$Boolean=true\nsys.component.S3TBX\$Boolean=false\nsys.component.SNAP\$Boolean=true\nsys.installationDir=/opt/snap\nsys.languageId=en\nsys.programGroupDisabled\$Boolean=false\nsys.symlinkDir=/usr/local/bin" >/tmp/snap.varfile
RUN wget $URL/$TBX -O /opt/$TBX && chmod +x /opt/$TBX && sh /opt/esa-snap_sentinel_unix_9_0_0.sh -q -varfile /tmp/snap.varfile && rm /opt/esa-snap_sentinel_unix_9_0_0.sh && sed -i 's+jdkhome="./jre"+jdkhome="$JAVA_HOME"+g' /opt/snap/etc/snap.conf && echo -Xmx14G > /opt/snap/bin/gpt.vmoptions && rm -rf /opt/snap/jre && find /opt/snap -name "*-ui.jar" | while read modules ; do rm -f $modules ; done
# COPY snap.auxdata.properties /opt/snap/etc/snap.auxdata.properties
# COPY snap.properties /opt/snap/etc/snap.properties
# test without now
# RUN
# #download latest doris version
# ML 10/2023: DORIS NOT NEEDED ANYMORE
# git clone https://github.com/LC-SAR/Doris5ITCupdate.git
# git clone https://anu_ITC:ATBB7BTWExS8eSLzQm5g3gyqJzggB09794E4@bitbucket.org/anu_itc/doris_5_patch2022.git
# git clone https://github.com/LC-SAR/Doris5requiredSoftware.git
# #Install fftw
# wget -c http://www.fftw.org/fftw-3.2.2.tar.gz && tar -xvf fftw-3.2.2.tar.gz && cd fftw-3.2.2 && mkdir -p /opt/lib/dorisreq && ./configure --prefix=/opt/lib/dorisreq --enable-float && make && make install && cd ..
# #Install doris core
# cd doris_5_patch2022/doris/doris_core && apt-get install -y tcsh csh && ./configure --path_to_fftw=/opt/lib/dorisreq && make && make install && cd ../../../
# #####ln -s `which g++-4` /usr/bin/g++
# #Install doris utilities
# cd ../sartools && make && make install