From 5399d9f04085f23e48b028bf0a42301784ab94f9 Mon Sep 17 00:00:00 2001 From: Alexander Berger Date: Wed, 17 Sep 2025 08:54:58 -0400 Subject: [PATCH] Organize all singularity definitions into vm directory --- README.md | 2 +- {support_code => vm}/RBase.def | 6 ++++-- vm/README.md | 4 ++-- {support_code => vm}/globus-cli.def | 0 vm/{singularity.def => runtime.def} | 6 ------ {support_code => vm}/sleap-1.4.1.def | 5 ++++- {support_code => vm}/sleap-io-0.2.0.def | 5 ++++- 7 files changed, 15 insertions(+), 13 deletions(-) rename {support_code => vm}/RBase.def (83%) rename {support_code => vm}/globus-cli.def (100%) rename vm/{singularity.def => runtime.def} (52%) rename {support_code => vm}/sleap-1.4.1.def (90%) rename {support_code => vm}/sleap-io-0.2.0.def (76%) diff --git a/README.md b/README.md index 3f6e28e6..ee2d29ec 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This repository uses both Pytorch and Tensorflow Serving (TFS). This repository supports both Docker and Singularity environments. The dockerfile is provided at the root of the repository ([Dockerfile](Dockerfile)), and the singularity -definition file is in the `vm` folder ([singularity.def](vm/singularity.def)). +definition file is in the `vm` folder ([singularity.def](vm/runtime.def)). To learn more about how we support this, please read [vm/README.md](vm/README.md). diff --git a/support_code/RBase.def b/vm/RBase.def similarity index 83% rename from support_code/RBase.def rename to vm/RBase.def index f979f131..886e75a3 100644 --- a/support_code/RBase.def +++ b/vm/RBase.def @@ -1,3 +1,6 @@ +# build like: +# singularity build RBase.sif vm/RBase.def + Bootstrap: docker From:rocker/tidyverse:4.4.2 @@ -5,7 +8,7 @@ From:rocker/tidyverse:4.4.2 mkdir -p ${SINGULARITY_ROOTFS}/mouse-tracking-runtime/support_code/ %files - behavior_summaries.R /mouse-tracking-runtime/support_code/. + support_code/behavior_summaries.R /mouse-tracking-runtime/support_code/. %post apt-get update @@ -19,4 +22,3 @@ From:rocker/tidyverse:4.4.2 apt-get install -y libnlopt-dev apt-get install -y build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libgit2-dev Rscript -e 'install.packages(c("usethis","devtools","optparse"), repos="https://cran.rstudio.com")' - diff --git a/vm/README.md b/vm/README.md index 041bccee..c4fbb4dd 100644 --- a/vm/README.md +++ b/vm/README.md @@ -47,7 +47,7 @@ The Singularity container: ### Building Singularity Images ```bash -singularity build mouse-tracking-runtime.sif vm/singularity.def +singularity build mouse-tracking-runtime.sif vm/runtime.def ``` ## Framework Compatibility @@ -75,7 +75,7 @@ docker run --gpus all mouse-tracking-runtime mouse-tracking-runtime --help ### Singularity ```bash # Build and run the Singularity container -singularity build mouse-tracking-runtime.sif vm/singularity.def +singularity build mouse-tracking-runtime.sif vm/runtime.def singularity run --nv mouse-tracking-runtime.sif mouse-tracking-runtime --help ``` diff --git a/support_code/globus-cli.def b/vm/globus-cli.def similarity index 100% rename from support_code/globus-cli.def rename to vm/globus-cli.def diff --git a/vm/singularity.def b/vm/runtime.def similarity index 52% rename from vm/singularity.def rename to vm/runtime.def index 80e38e5b..bb2d1882 100644 --- a/vm/singularity.def +++ b/vm/runtime.def @@ -1,11 +1,5 @@ -# build like: -# singularity build mouse-tracking-runtime.sif singularity.def - Bootstrap: docker From: aberger4/mouse-tracking:python3.10-slim %setup mkdir -p ${SINGULARITY_ROOTFS}/workspace/models/ - -%files - ./models /workspace/ diff --git a/support_code/sleap-1.4.1.def b/vm/sleap-1.4.1.def similarity index 90% rename from support_code/sleap-1.4.1.def rename to vm/sleap-1.4.1.def index 955ea9c3..a040200a 100644 --- a/support_code/sleap-1.4.1.def +++ b/vm/sleap-1.4.1.def @@ -1,3 +1,6 @@ +# build like: +# singularity build sleap-1.4.1.sif vm/sleap-1.4.1.def + Bootstrap: docker from: ubuntu:22.04 @@ -5,7 +8,7 @@ from: ubuntu:22.04 mkdir -p ${SINGULARITY_ROOTFS}/mouse-tracking-runtime/support_code/ %files - static-object-correct.py /mouse-tracking-runtime/support_code/. + support_code/static-object-correct.py /mouse-tracking-runtime/support_code/. %post apt-get update diff --git a/support_code/sleap-io-0.2.0.def b/vm/sleap-io-0.2.0.def similarity index 76% rename from support_code/sleap-io-0.2.0.def rename to vm/sleap-io-0.2.0.def index ceb4f96a..ba62163c 100644 --- a/support_code/sleap-io-0.2.0.def +++ b/vm/sleap-io-0.2.0.def @@ -1,3 +1,6 @@ +# build like: +# singularity build sleap-io-0.2.0.sif vm/sleap-io-0.2.0.def + Bootstrap: docker from: python:3.10-bookworm @@ -5,7 +8,7 @@ from: python:3.10-bookworm mkdir -p ${SINGULARITY_ROOTFS}/mouse-tracking-runtime/support_code/ %files - static-object-correct.py /mouse-tracking-runtime/support_code/. + support_code/static-object-correct.py /mouse-tracking-runtime/support_code/. %post apt-get update