From 56c69811a864f71d284f2d2204e0a3029dbecfa6 Mon Sep 17 00:00:00 2001 From: Dan Levitas Date: Fri, 2 Feb 2024 18:41:49 +0000 Subject: [PATCH] small changes --- dev.sh | 56 ++++++++++++++++++++--------------------- singularity-compose.yml | 9 +++---- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/dev.sh b/dev.sh index 564e4386..6ae983a1 100755 --- a/dev.sh +++ b/dev.sh @@ -47,29 +47,29 @@ export SINGULARITY_CACHEDIR=/tmp # chmod -R 770 $PWD/mongodb/data/db # fi -if [ ! -f $PWD/mongodb/mongodb.sif ]; then # Will eventually be redundant and can remove - echo "building mongodb" - # build image - singularity build \ - --arch "amd64" \ - --fakeroot \ - --disable-cache \ - $PWD/mongodb/mongodb.sif \ - $PWD/mongodb/Singularity +# if [ ! -f $PWD/mongodb/mongodb.sif ]; then # Will eventually be redundant and can remove +# echo "building mongodb" +# # build image +# singularity build \ +# --arch "amd64" \ +# --fakeroot \ +# --disable-cache \ +# $PWD/mongodb/mongodb.sif \ +# $PWD/mongodb/Singularity - # start the container instance - singularity instance start \ - --fakeroot \ - --bind $PWD/mongodb/data/db:/data/db \ - $PWD/mongodb/mongodb.sif \ - brainlife_ezbids-mongodb - - - # --net \ - # --network-args "portmap=27417:27017/tcp" \ - # --bind $PWD/data/db:/data/db \ # Might not need this if mongodb/Singularity contains a %files section - # singularity run instance://brainlife_ezbids-mongodb # This seems to run mongodb in the foreground, meaning can't move on to building other containers. -fi +# # start the container instance +# singularity instance start \ +# --fakeroot \ +# --bind $PWD/mongodb/data/db:/data/db \ +# $PWD/mongodb/mongodb.sif \ +# brainlife_ezbids-mongodb + + +# # --net \ +# # --network-args "portmap=27417:27017/tcp" \ +# # --bind $PWD/data/db:/data/db \ # Might not need this if mongodb/Singularity contains a %files section +# # singularity run instance://brainlife_ezbids-mongodb # This seems to run mongodb in the foreground, meaning can't move on to building other containers. +# fi # if [ ! -f $PWD/api/api.sif ]; then # echo "building api" @@ -93,10 +93,10 @@ fi -# # Approach #2: singularity-compose +# Approach #2: singularity-compose -# # if [ ! -d $PWD/mongodb/data/db ]; then -# # mkdir -p $PWD/mongodb/data/db -# # chmod -R 770 $PWD/mongodb/data/db -# # fi -# singularity-compose --debug up --no-resolv \ No newline at end of file +# if [ ! -d $PWD/mongodb/data/db ]; then +# mkdir -p $PWD/mongodb/data/db +# chmod -R 770 $PWD/mongodb/data/db +# fi +singularity-compose --debug up --no-resolv \ No newline at end of file diff --git a/singularity-compose.yml b/singularity-compose.yml index ba88a9ae..d60ba467 100644 --- a/singularity-compose.yml +++ b/singularity-compose.yml @@ -40,11 +40,10 @@ instances: mongodb: # FOURTH ATTEMPT container_name: brainlife_ezbids-mongodb - image: docker://mongo:4.4.15 - # build: - # context: ./mongodb - # options: - # - fakeroot + build: + context: ./mongodb + options: + - fakeroot platform: linux/amd64 volumes: - ./mongodb/data/db:/data/db