.. # define a hard line break for HTML .. |br| raw:: html
.. _bootstrap: Bootstrap the working environment --------------------------------- LMOD ++++ To simplify the maintenance and installation of multiple versions of S1Tiling, using different versions of OTB and so on, I use `LMOD `_ to organize the various installations as various *modules*. The following procedure is written with this consideration in mind: the scripts I document below produce and use LMOD modules. S1Tiling ++++++++ .. code:: bash # 1. Use where you will work from cd /some/where # 2. Clone S1Tiling project git clone git@gitlab.orfeo-toolbox.org:s1-tiling/s1tiling.git # 3. Install git hooks # - either install default version -> copy git hooks s1tiling/resources/install/install-githook.sh # - or install with a symlink s1tiling/resources/install/install-githook.sh symlink # - or install with a hard-link s1tiling/resources/install/install-githook.sh hardlink # 4. Install the project # Parameters are: # * -p # * # * # It will: # * create a conda virtual environment, # * extract OTB binaries in "current_directory/OTB-{REF_OTB_VERSION}-Linux-py313" # * and install S1Tiling as if done with: `pip install -e .[dev,doc]` # If LMOD is detected a s1tiling module will be created s1tiling/resources/install/install-rcbin.sh -p 3.13 path/to/OTB-{REF_OTB_VERSION}-Linux.tar.gz some/where/s1tiling The 4th step is one integrated way to install S1Tiling, many other approaches are possible. See :ref:`Installation chapter `. Support projects ++++++++++++++++ normlim_sigma0 ^^^^^^^^^^^^^^ Expecting the project is organized as: .. code:: normlim_sigma0/ +-> src/ +-> build/ +-> install/ +-> compile-and-install.sh thanks to: .. code:: bash cd /some/where mkdir -p normlim_sigma0/{build,install} cd normlim_sigma0 git clone git@gitlab.orfeo-toolbox.org:s1-tiling/normlim_sigma0.git src ln -s src/scripts/compile-and-install.sh If you have LMOD installed, and if you have used the previous procedure to install S1Tiling and its LMOD module (named :file:`s1tiling/{REF_OTB_SHORT_VERSION}-py313`), the project can be compiled and installed with: .. code:: bash ./compile-and-install.sh s1tiling/{REF_OTB_SHORT_VERSION}-py313 RelWithDebInfo The result will be installed in :file:`install/s1tiling-{REF_OTB_SHORT_VERSION}-py313/`, and a new module named :file:`SARCalibrationExtended/{REF_OTB_SHORT_VERSION}-py313` will be generated. rtc_gamma0 ^^^^^^^^^^ This project currently depends on the previous one, normlim_sigma0, and its module. Using the same organization the procedure becomes now: .. code:: bash cd /some/where mkdir -p rtc_gamma0/{build,install} cd rtc_gamma0 git clone git@gitlab.orfeo-toolbox.org:s1-tiling/rtc_gamma0.git src ln -s src/scripts./compile-and-install.sh ./compile-and-install.sh SARCalibrationExtended/{REF_OTB_SHORT_VERSION}-py313 RelWithDebInfo Eventually: Running S1Tiling or debugging OTB applications ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ To use S1Tiling, you can load all the modules with: .. code:: bash ml rtc_gamma0/{REF_OTB_SHORT_VERSION}-py313 In case you need to debug the support applications, and not run S1Tiling, :envvar:`$USE_GDB` can be set to disable activating conda environment. This is required because gdb will use the version of Python installed on the system, version that will be incompatible with the one in the virtual environment. .. code:: bash USE_GDB=YES ml rtc_gamma0/{REF_OTB_SHORT_VERSION}-py313 GDAL_NUM_THREADS=12 ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=10 \ gdb --args path/to/OTB-{REF_OTB_VERSION}-Linux-py313/bin/otbApplicationLauncherCommandLine \ SARComputeGroundAndSatPositionsOnEllipsoid \ application parameters...