-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for supporting CLI singularity arguments when input fo…
…r singularity runner is docker configuration. (#352) Brief description. This commit reimplements the logic that singularity runner uses to determine its configuration when it is not fully specified. - If `singularity` section not present, a new one, empty, is created. - If SIF file path can be identified, and the file exists, configuration is considered to be complete. For this to happen, `image` key must be present. - If recipe (`build_file`) can be identified, and it's either a docker image or an existing singularity recipe file, configuration is considered to be complete. If `image` not present, it is added. - Finally, docker configuration is used to identify build source (build_file will point to docker image or tar file) and `image`. Additionally, to be consistent with prev implementation `singularity` and `build_args` maybe overridden. Known issue. If during the configure phase, an error occured, you may need (depending on error) - Either install uidmap `sudo apt-get install uidmap`. - Overwrite `build_args` to disable --fakeroot singularity build argument that may be set automatically (e.g., mlcube run ... -Psingularity.build_args="''"). Detailed log. Set log level to `debug`: `mlcube --log-level=debug ...`. Fixing singularity unit tests. Previous implementation used the mock module to mock `io.open` calls to test mlcubes. This worked for all calls to `io.open`. New implementation invokes `subprocess.check_output` that seems to be using `io.open` internally that did not work with existing implementation. New mocking strategy is to mock `io.open` call only for specific file paths (e.g., paths to mlcube configuration files).
- Loading branch information
1 parent
8833ec0
commit 16999ea
Showing
4 changed files
with
147 additions
and
55 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
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