forked from MultiSAR/MultiRTC
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.combined
More file actions
57 lines (45 loc) · 2.24 KB
/
Dockerfile.combined
File metadata and controls
57 lines (45 loc) · 2.24 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
FROM condaforge/mambaforge:latest
# For opencontainers label definitions, see:
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL org.opencontainers.image.title="MultiRTC"
LABEL org.opencontainers.image.description="ISCE3-based RTC generation for multiple sensors"
LABEL org.opencontainers.image.vendor="Jiang Zhu"
LABEL org.opencontainers.image.licenses="BSD-3-Clause"
ARG DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=true
RUN apt-get update && apt-get install -y --no-install-recommends unzip vim && \
apt-get clean && rm -rf /var/lib/apt/lists/*
ARG CONDA_UID=1000
ARG CONDA_GID=1000
RUN groupadd -g "${CONDA_GID}" --system conda && \
useradd -l -u "${CONDA_UID}" -g "${CONDA_GID}" --system -d /home/conda -m -s /bin/bash conda && \
chown -R conda:conda /opt && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/conda/.profile && \
echo "conda activate base" >> /home/conda/.profile
USER ${CONDA_UID}
SHELL ["/bin/bash", "-l", "-c"]
WORKDIR /home/conda/
COPY --chown=${CONDA_UID}:${CONDA_GID} . ./multirtc/
RUN mamba env create -f ./multirtc/environment.combined.yml && \
conda clean -afy && \
conda activate multirtc && \
sed -i 's/conda activate base/conda activate multirtc/g' /home/conda/.profile && \
python -m pip install --no-cache-dir ./multirtc && \
conda remove --force -y isce3
# repo git@github.com:cirrusasf/isce3.git is forked from https://github.com/forrestfwilliams/isce3.git
RUN mkdir -p ./isce3/isce3_build && \
mkdir -p ./isce3/isce3_install && \
git clone --branch pfa https://github.com/cirrusasf/isce3.git ./isce3/isce3_src && \
cd ./isce3/isce3_build && \
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX=/home/conda/isce3/isce3_install /home/conda/isce3/isce3_src && \
make -j"$(nproc)" && \
make install && \
cd ../.. && \
rm -rf isce3/isce3_build isce3/isce3_src
ENV ISCE_INSTALL=/home/conda/isce3/isce3_install
ENV PATH=$ISCE_INSTALL/bin:$ISCE_INSTALL/packages/nisar/workflows/:$PATH \
PYTHONPATH=$ISCE_INSTALL/packages:$ISCE_INSTALL/lib:$PYTHONPATH \
LD_LIBRARY_PATH=$ISCE_INSTALL/lib:$LD_LIBRARY_PATH \
GDAL_VRT_ENABLE_PYTHON=YES
ENTRYPOINT ["/home/conda/multirtc/src/multirtc/etc/entrypoint.sh"]
CMD ["-h"]