From 6e73b6017a2c9c61f6c73bb0548d0328a523ffed Mon Sep 17 00:00:00 2001 From: bonaime Date: Fri, 4 Feb 2022 10:54:18 +0100 Subject: [PATCH 1/2] Singularity tutorial --- source/tutorials.rst | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/source/tutorials.rst b/source/tutorials.rst index 817a55858..9fa427964 100644 --- a/source/tutorials.rst +++ b/source/tutorials.rst @@ -296,6 +296,65 @@ Cleaning up after Docker Docker has a lamentable use of space and by default does not clean up excess data and machines when processes are complete. This can be advantageous if we need to access a process that has since terminated, but carries the burden of using increasing amounts of storage over time. Maciej Ɓebkowski has an `excellent overview of how to manage excess disk usage in docker `_. +***************** +Using Singularity +***************** + +'Singularity '_ is another container platform able to run Docker images. Singularity could be used from laptop to large HPC clusters, local university or company clusters, a single server, in the cloud... +A container is a single file without anything else to install + +Downloading image +================= +Singularity can use ODM Docker container after their download. It creates .sif images + +For latest ODM Docker image +:: + > singularity pull --disable-cache docker://opendronemap/odm:latest + +For latest ODM GPU Docker image + +:: + > singularity pull --disable-cache docker://opendronemap/odm:gpu + +Using Singularity SIF image +=========================== + +As Singularity has a different way to map directories than Docker, a bash script file is a good solution to map ODM directories. +Here is a linux example for ODM :: + + images_dir=/path_to_image_dir/ + name=`basename $images_dir` + output_dir=/path_to_output_directories/$name + mkdir -p $output_dir + + singularity run + --bind $images_dir:/$output_dir/code/images,\ + --writable-tmpfs odm_latest.sif \ + --orthophoto-png --mesh-octree-depth 12 --ignore-gsd --dtm \ + --smrf-threshold 0.4 --smrf-window 24 --dsm --pc-csv --pc-las --orthophoto-kmz \ + --ignore-gsd --matcher-type flann --feature-quality ultra --max-concurrency 16 \ + --use-hybrid-bundle-adjustment --build-overviews --time --min-num-features 10000 \ + --debug --project-path $output_dir + + +Here is a linux example for the ODM with GPU:: + + images_dir=/path_to_image_dir/ + name=`basename $images_dir` + output_dir=/path_to_output_directories/$name + mkdir -p $output_dir + + singularity run + --bind $images_dir:/$output_dir/code/images,\ + --writable-tmpfs odm_latest.sif \ + --orthophoto-png --mesh-octree-depth 12 --ignore-gsd --dtm \ + --smrf-threshold 0.4 --smrf-window 24 --dsm --pc-csv --pc-las --orthophoto-kmz \ + --ignore-gsd --matcher-type flann --feature-quality ultra --max-concurrency 16 \ + --use-hybrid-bundle-adjustment --build-overviews --time --min-num-features 10000 \ + --debug --project-path $output_dir + + + ************************************* Using ODM from low-bandwidth location ************************************* From b8ee903691ff17194ad2babb068f6ee838f04022 Mon Sep 17 00:00:00 2001 From: bonaime Date: Fri, 4 Feb 2022 14:49:18 +0100 Subject: [PATCH 2/2] remove debug in examples --- source/tutorials.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/tutorials.rst b/source/tutorials.rst index 9fa427964..f52b5672b 100644 --- a/source/tutorials.rst +++ b/source/tutorials.rst @@ -334,7 +334,7 @@ Here is a linux example for ODM :: --smrf-threshold 0.4 --smrf-window 24 --dsm --pc-csv --pc-las --orthophoto-kmz \ --ignore-gsd --matcher-type flann --feature-quality ultra --max-concurrency 16 \ --use-hybrid-bundle-adjustment --build-overviews --time --min-num-features 10000 \ - --debug --project-path $output_dir + --project-path $output_dir Here is a linux example for the ODM with GPU:: @@ -351,7 +351,7 @@ Here is a linux example for the ODM with GPU:: --smrf-threshold 0.4 --smrf-window 24 --dsm --pc-csv --pc-las --orthophoto-kmz \ --ignore-gsd --matcher-type flann --feature-quality ultra --max-concurrency 16 \ --use-hybrid-bundle-adjustment --build-overviews --time --min-num-features 10000 \ - --debug --project-path $output_dir + --project-path $output_dir