Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Levitas committed Feb 2, 2024
1 parent e14dce4 commit 56c6981
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 33 deletions.
56 changes: 28 additions & 28 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
# 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
9 changes: 4 additions & 5 deletions singularity-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56c6981

Please sign in to comment.