Hi,
I’ve not really looked at this for about a year - lockdown has changed priorities etc but hopefully I’ll get chance to look at this again at some point in the future. Anyway, from what I can remember, this is what I did the following. The reason I used Singularity was to run containers on hosts as unprivileged users. The hope was that we could have a permanent WebODM portal and clusterODM, and then fire up instances of NodeODM on demand (that’s where the request for scheduler support comes in):
WebODM - basically run as the standard Docker container. Was too complicated to convert to singularity, but also was running on a host I was happy to run it as administrator on.
ClusterODM - Run with singularity with a 4GB overlay, i.e.
singularity run --overlay clusterodm.overlay clusterodm-ubuntu.img
Where the container recipe is:
Bootstrap: docker
From: node:lts
%post
apt update
apt install -y curl telnet git
git clone GitHub - OpenDroneMap/ClusterODM: A NodeODM API compatible autoscalable load balancer and task tracker for easy horizontal scaling ♆
cd ClusterODM
npm install
mv config-default.json config-default.json.org
cat config-default.json.org | sed “s/"admin-pass": "",/"admin-pass": "somepasswd123!",/g” > config-default.json
chgrp -R 7100 /ClusterODM
%runscript
/bin/bash <<EOF
cd /ClusterODM
node index.js
EOF
NodeODM - Run with singularity and again with an overlay file. This time I used a 32GB overlay, created on /dev/shm for speed (I’m trying to make use of HPC systems, so we have plenty of RAM available on these nodes!)
Bootstrap: docker
From: opendronemap/odm:latest
%setup
mkdir -p ${SINGULARITY_ROOTFS}/var/www
%files
/home/524070/ODM/NodeODM/* /var/www/
%post
apt update
apt install -y curl telnet git
curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs python-gdal && npm install -g nodemon && ln -s /code/SuperBuild/install/bin/entwine /usr/bin/entwine
cd /var/www
pwd
npm install
chown -R bob:7100 /var/www
chown -R bob:7100 /code
%runscript
/bin/bash <<EOF
cd /var/www
node index.js
The way I was running it, with clusterODM working, I needed to telnet localhost 8080 and run login then node add whatever host was running the NodeODM container on.
Hope this helps somewhat…