From 3a4a9578744e505c4e22f6b76720a9198ca2c0ae Mon Sep 17 00:00:00 2001 From: nghi01 Date: Mon, 23 Jan 2023 07:45:53 -0500 Subject: [PATCH 1/4] Create definition file ported from Dockerfile --- singularity.def | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 singularity.def diff --git a/singularity.def b/singularity.def new file mode 100644 index 0000000..8c4e5e3 --- /dev/null +++ b/singularity.def @@ -0,0 +1,34 @@ +Bootstrap: docker +From: opendronemap/odm:latest +Stage: spython-base + +%files +. /var/www +%labels +MAINTAINER Piero Toffanin +%post + +# EXPOSE 3000 + +su - root # USER root +apt-get update && apt-get install -y curl gpg-agent +curl --silent --location https://deb.nodesource.com/setup_14.x | bash - +apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \ +ln -s /code/SuperBuild/install/bin/untwine /usr/bin/untwine && \ +ln -s /code/SuperBuild/install/bin/entwine /usr/bin/entwine && \ +ln -s /code/SuperBuild/install/bin/pdal /usr/bin/pdal + + +mkdir -p /var/www + +mkdir -p "/var/www" +cd "/var/www" + +npm install --production && mkdir -p tmp + +%runscript +cd "/var/www" +exec /usr/bin/node /var/www/index.js "$@" +%startscript +cd "/var/www" +exec /usr/bin/node /var/www/index.js "$@" From 78f05c3c2423f445e28d0eea5c586056d08bef5e Mon Sep 17 00:00:00 2001 From: nghi01 Date: Mon, 23 Jan 2023 08:01:56 -0500 Subject: [PATCH 2/4] Update initial README for apptainer instructions We will use Apptainer to run NodeODM on HPC, together with ClusteRODM. This is the initial push for documentation. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c969cc4..2c8e3d2 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,13 @@ docker run -p 3000:3000 opendronemap/nodeodm docker-machine ip ``` +* A rootless alternative to Docker is using [Apptainer](https://apptainer.org/). In order to run NodeODM together with ClusterODM on HPC, we need a rootless alternative to Docker, and that's where Apptainer comes in to play. From the Linux command line, run: + +``` +apptainer build --sandbox node/ singularity.def +apptainer run --writable node/ +``` + Linux users can connect to 127.0.0.1. * Open a Web Browser to `http://:3000` From 798303a20b1fb7e52944080843cfb40b218de63d Mon Sep 17 00:00:00 2001 From: nghi01 Date: Mon, 23 Jan 2023 08:04:42 -0500 Subject: [PATCH 3/4] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c8e3d2..2baceec 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ docker run -p 3000:3000 opendronemap/nodeodm docker-machine ip ``` -* A rootless alternative to Docker is using [Apptainer](https://apptainer.org/). In order to run NodeODM together with ClusterODM on HPC, we need a rootless alternative to Docker, and that's where Apptainer comes in to play. From the Linux command line, run: +* A rootless alternative to Docker is using [Apptainer](https://apptainer.org/). In order to run NodeODM together with ClusterODM on HPC, we need a rootless alternative to Docker, and that's where Apptainer comes in to play. From the Linux command line, run the following commands to host a NodeODM instance: ``` apptainer build --sandbox node/ singularity.def From 7e7c49f6a445460af6d6570616e4bf6df556f43d Mon Sep 17 00:00:00 2001 From: nghi01 Date: Mon, 23 Jan 2023 08:07:05 -0500 Subject: [PATCH 4/4] Revise unclear instruction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2baceec..d929cad 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ docker run -p 3000:3000 opendronemap/nodeodm docker-machine ip ``` -* A rootless alternative to Docker is using [Apptainer](https://apptainer.org/). In order to run NodeODM together with ClusterODM on HPC, we need a rootless alternative to Docker, and that's where Apptainer comes in to play. From the Linux command line, run the following commands to host a NodeODM instance: +* A rootless alternative to Docker is using [Apptainer](https://apptainer.org/). In order to run NodeODM together with ClusterODM on HPC, we need a rootless alternative to Docker, and that's where Apptainer comes in to play. From the Linux command line, cd into the NodeODM folder and run the following commands to host a NodeODM instance: ``` apptainer build --sandbox node/ singularity.def