| 1 |
FROM mambaorg/micromamba:debian12-slim |
| 2 |
# FROM mambaorg/micromamba |
| 3 |
|
| 4 |
USER root |
| 5 |
RUN apt-get update && apt-get install -y \ |
| 6 |
software-properties-common |
| 7 |
RUN apt-get install -y git python3-pip wget libpq-dev procps gdal-bin |
| 8 |
RUN apt-get install -y gcc g++ build-essential |
| 9 |
RUN apt-get install -y unzip |
| 10 |
# Extra libs for C-PolSARPro, not needed for the subset of features we consider |
| 11 |
# RUN apt-get install -y freeglut3-dev libfreeimage-dev |
| 12 |
# RUN apt-get install -y libtk-img iwidgets4 bwidget |
| 13 |
# RUN apt-get install -y libglew-dev |
| 14 |
|
| 15 |
# Install C-version of PolSARPro -- zip file needs to be downloaded from |
| 16 |
# https://ietr-lab.univ-rennes1.fr/polsarpro-bio/Linux/PolSARpro_v6.0.3_Biomass_Edition_Linux_Installer_20210501.zip |
| 17 |
ARG CPSPDIR="/home/c_psp/" |
| 18 |
WORKDIR ${CPSPDIR} |
| 19 |
COPY PolSARpro_v6.0.4_Biomass_Edition_Linux_Installer_20250122.zip ${CPSPDIR} |
| 20 |
RUN unzip ${CPSPDIR}PolSARpro_v6.0.4_Biomass_Edition_Linux_Installer_20250122.zip |
| 21 |
# we use custom building scripts |
| 22 |
COPY scripts/Compil_PolSARpro_Biomass_Edition_Linux.sh ${CPSPDIR}Soft |
| 23 |
COPY scripts/PolSARpro_v6.0.4_Biomass_Edition_Linux_Installation.sh ${CPSPDIR} |
| 24 |
RUN chmod +x PolSARpro_v6.0.4_Biomass_Edition_Linux_Installation.sh |
| 25 |
RUN ./PolSARpro_v6.0.4_Biomass_Edition_Linux_Installation.sh |
| 26 |
|
| 27 |
# Setup micromamba (lightweight conda clone) |
| 28 |
WORKDIR "/tmp/conda_init/" |
| 29 |
SHELL [ "/bin/bash", "--login", "-c" ] |
| 30 |
RUN micromamba shell init --shell=bash --root-prefix=~/micromamba |
| 31 |
RUN source ~/.bashrc |
| 32 |
COPY environment.yaml environment.yaml |
| 33 |
RUN micromamba create -f environment.yaml |
| 34 |
RUN echo "micromamba activate psp" >> ~/.bashrc |
| 35 |
RUN echo "alias conda='micromamba'" >> ~/.bashrc |
| 36 |
RUN micromamba activate psp |