Skip to content

Commit

Permalink
Use correct container path
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Roberts committed Aug 17, 2023
1 parent 1c404a0 commit 7ab89e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
containerdef:
- container/container.def
- name: Build container if definition has changed
if: steps.changed-container-def.outputs.test_any_changed == 'true'
if: steps.changed-container-def.outputs.containerdef_any_changed == 'true'
run: |
pushd container
sudo -E singularity build base.sif container.def
Expand Down
9 changes: 8 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,14 @@ fi

ln -sf "${ENV_INSTALLATION_PATH}" "${CONDA_OUTER_BASE}"/"${APPS_SUBDIR}"/"${CONDA_INSTALL_BASENAME}"/envs/

"${SINGULARITY_BINARY_PATH}" -s exec --bind /etc,/half-root,/local,/ram,/run,/system,/usr,/var/lib/sss,/var/run/munge,/var/lib/rpm,"${OVERLAY_BASE}":/g "${CONTAINER_PATH}" $( realpath $0 ) --inner "${DO_UPDATE}"
if [[ -e "${CONTAINER_PATH}" ]]; then
### New container, use that
my_container="${CONTAINER_PATH}"
else
my_container="${CONDA_OUTER_BASE}"/"${APPS_SUBDIR}"/"${CONDA_INSTALL_BASENAME}"/etc/"${CONTAINER_PATH##*/}"
fi

"${SINGULARITY_BINARY_PATH}" -s exec --bind /etc,/half-root,/local,/ram,/run,/system,/usr,/var/lib/sss,/var/run/munge,/var/lib/rpm,"${OVERLAY_BASE}":/g "${my_container}" $( realpath $0 ) --inner "${DO_UPDATE}"
if [[ $? -ne 0 ]]; then
exit 1
fi
Expand Down

0 comments on commit 7ab89e1

Please sign in to comment.