From c1fb47fba9f2d28cc07f4b9417df7bd0bf293ae9 Mon Sep 17 00:00:00 2001 From: kikislater Date: Wed, 18 Sep 2024 09:44:25 +0000 Subject: [PATCH 1/5] Apptainer/Singularity enhancement --- apptainer.def | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apptainer.def b/apptainer.def index 8f6f385..b5dae43 100644 --- a/apptainer.def +++ b/apptainer.def @@ -1,17 +1,21 @@ Bootstrap: docker From: opendronemap/nodemicmac:master +Stage: spython-base %labels Author Sylvain POULAIN - Version 1.0 + Version 1.1 Description Apptainer container for NodeMICMAC and WebGIS with Entwine and MicMac. %environment export PATH=$PATH:/code/micmac/bin export python=$(which python3) + export LC_ALL=C + export PYTHONUNBUFFERED=1 + export LD_LIBRARY_PATH="/lib/x86_64-linux-gnu:/usr/lib" %post - + su - root # USER root mkdir -p /var/www mkdir -p "/var/www" From 32992805ff81ca8a37b4cbaa63461710c56e46ee Mon Sep 17 00:00:00 2001 From: kikislater Date: Wed, 18 Sep 2024 09:48:59 +0000 Subject: [PATCH 2/5] Remove AWS annoying message --- libs/S3.js | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/S3.js b/libs/S3.js index 160163f..06e2328 100644 --- a/libs/S3.js +++ b/libs/S3.js @@ -18,6 +18,7 @@ along with this program. If not, see . "use strict"; const async = require('async'); const AWS = require('aws-sdk'); +require("aws-sdk/lib/maintenance_mode_message").suppress = true; const fs = require('fs'); const glob = require('glob'); const path = require('path'); From 18dd781bb27ae5dbf6296401576474f1e477a6aa Mon Sep 17 00:00:00 2001 From: kikislater Date: Wed, 18 Sep 2024 10:27:13 +0000 Subject: [PATCH 3/5] Revert "Remove AWS annoying message" This reverts commit 32992805ff81ca8a37b4cbaa63461710c56e46ee. --- libs/S3.js | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/S3.js b/libs/S3.js index 06e2328..160163f 100644 --- a/libs/S3.js +++ b/libs/S3.js @@ -18,7 +18,6 @@ along with this program. If not, see . "use strict"; const async = require('async'); const AWS = require('aws-sdk'); -require("aws-sdk/lib/maintenance_mode_message").suppress = true; const fs = require('fs'); const glob = require('glob'); const path = require('path'); From a0d96d18838ecca77dfdd518028dd965609f4cdd Mon Sep 17 00:00:00 2001 From: kikislater Date: Wed, 18 Sep 2024 13:01:55 +0000 Subject: [PATCH 4/5] Apptainer/Singularity enhancement --- apptainer.def | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apptainer.def b/apptainer.def index b5dae43..d91eebf 100644 --- a/apptainer.def +++ b/apptainer.def @@ -16,6 +16,17 @@ Stage: spython-base %post su - root # USER root + + # apt-get update + # apt-get install -y -qq --no-install-recommends software-properties-common build-essential cmake git exiv2 libimage-exiftool-perl proj-bin gdal-bin figlet imagemagick pdal libpdal-dev libboost-all-dev libtbb-dev libssl-dev libcurl4-openssl-dev pkg-config libpth-dev curl libx11-dev python3-pip python3-setuptools python3-shapely apt-utils p7zip-full + + # pip3 install -U shyaml + # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org appsettings + # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org utm + # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pyproj #==2.2.0 + # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org scikit-image + ln -s /lib/x86_64-linux-gnu/*.so /usr/lib/ + mkdir -p /var/www mkdir -p "/var/www" From b1450073f517075d951f286403102196c367ac7f Mon Sep 17 00:00:00 2001 From: kikislater Date: Wed, 18 Sep 2024 14:05:55 +0000 Subject: [PATCH 5/5] run.sh modification --- apptainer.def | 2 +- micmac/run.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apptainer.def b/apptainer.def index d91eebf..8ddd0d7 100644 --- a/apptainer.def +++ b/apptainer.def @@ -25,7 +25,7 @@ Stage: spython-base # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org utm # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pyproj #==2.2.0 # pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org scikit-image - ln -s /lib/x86_64-linux-gnu/*.so /usr/lib/ + # ln -s /lib/x86_64-linux-gnu/*.so /usr/lib/ mkdir -p /var/www diff --git a/micmac/run.sh b/micmac/run.sh index c8932b6..320d8ef 100755 --- a/micmac/run.sh +++ b/micmac/run.sh @@ -1,6 +1,8 @@ #!/bin/bash -echo "NodeMICMAC" RUNPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -$RUNPATH/run.py "$@" -exit 0 \ No newline at end of file +if [ -e $RUNPATH/venv ]; then + source $RUNPATH/venv/bin/activate +fi +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/$(uname -i)-linux-gnu +/usr/bin/python3 $RUNPATH/run.py "$@"