Skip to content

Commit

Permalink
Merge pull request #191 from nghi01/apptainer-def
Browse files Browse the repository at this point in the history
Create initial Apptainer definition file and some initial instructions on running Apptainer on HPC
  • Loading branch information
pierotofy authored Jan 23, 2023
2 parents fc5c87e + 7e7c49f commit f5b9866
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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, cd into the NodeODM folder and run the following commands to host a NodeODM instance:

```
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://<yourDockerMachineIp>:3000`
Expand Down
34 changes: 34 additions & 0 deletions singularity.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Bootstrap: docker
From: opendronemap/odm:latest
Stage: spython-base

%files
. /var/www
%labels
MAINTAINER Piero Toffanin <[email protected]>
%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 "$@"

0 comments on commit f5b9866

Please sign in to comment.