From 7405d9ae4273fb0cce3439afbc851003ba6d2b14 Mon Sep 17 00:00:00 2001 From: kikislater Date: Tue, 17 Sep 2024 11:54:17 +0000 Subject: [PATCH] Apptainer/Singularity writable --- README.md | 12 ++---------- apptainer.def | 8 ++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cc79d4f..90dc4ec 100644 --- a/README.md +++ b/README.md @@ -251,18 +251,10 @@ This can be also used to access the computation results directly from the file s ## Run it using Apptainer (or commercial version: Singularity) on HPC, Server or Workstation -### Using Docker image: - -```bash -# Replace `apptainer` by `singularity` if you don't use appatainer -apptainer pull --name nodemicmac.sif docker://opendronemap/nodemicmac:master -apptainer run --bind $PWD:/var/www nodemicmac.sif -``` - ### Using def file: ```bash -apptainer -v build --notest nodemicmac.sif apptainer.def -apptainer run --bind $PWD:/var/www nodemicmac.sif +apptainer -v build --sandbox nodemicmac.sif apptainer.def +apptainer run --writable nodemicmac.sif ``` diff --git a/apptainer.def b/apptainer.def index 76828b2..8f6f385 100644 --- a/apptainer.def +++ b/apptainer.def @@ -10,6 +10,14 @@ From: opendronemap/nodemicmac:master export PATH=$PATH:/code/micmac/bin export python=$(which python3) +%post + + mkdir -p /var/www + + mkdir -p "/var/www" + cd "/var/www" + mkdir -p tmp + %runscript cd "/var/www" exec /usr/bin/node /var/www/index.js "$@"