-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from dmachi/master
exit with the exit code from a app when run()
- Loading branch information
Showing
6 changed files
with
56 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Exit Code from run | ||
|
||
This should be built from the root of the repository as follows: | ||
|
||
``` | ||
# apptainer build scif.sif docs/examples/exit-from-run/apptainer.def | ||
``` | ||
|
||
The force_fail app returns exit code 155 | ||
``` | ||
$ apptainer run scif.sif run force_fail ; echo "Exit Code: $?"; | ||
[force_fail] executing /bin/bash /scif/apps/force_fail/scif/runscript | ||
Calling exit 155 | ||
ERROR Return code 155 | ||
Exit Code: 155 | ||
``` | ||
|
||
The 'success' app returns exit code 0 | ||
|
||
``` | ||
$ apptainer run scif.sif run success ; echo "Exit Code: $?"; | ||
[success] executing /bin/bash /scif/apps/success/scif/runscript | ||
Running successfully | ||
Exit Code: 0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Bootstrap: docker | ||
From: continuumio/miniconda3 | ||
|
||
# apptainer build scif.simg docs/examples/exit-from-run/apptainer.def | ||
|
||
%runscript | ||
exec /opt/conda/bin/scif "$@" | ||
|
||
%files | ||
docs/examples/exit-from-run/recipe.scif /recipe.scif | ||
. /opt/scif | ||
%post | ||
apt-get update && apt-get install -y git build-essential | ||
|
||
# Install SCIF | ||
cd /opt/scif | ||
/opt/conda/bin/pip install setuptools | ||
/opt/conda/bin/pip install . | ||
scif install /recipe.scif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
%apprun force_fail | ||
echo "Calling exit 155" | ||
exit 155 | ||
|
||
%apprun success | ||
echo "Running successfully" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
""" | ||
|
||
__version__ = "0.0.81" | ||
__version__ = "0.0.82" | ||
AUTHOR = "Vanessa Sochat" | ||
AUTHOR_EMAIL = "[email protected]" | ||
NAME = "scif" | ||
|