Added code to support Singularity on HiperGator#389
Open
suhasthegame wants to merge 20 commits intogirder:masterfrom
Open
Added code to support Singularity on HiperGator#389suhasthegame wants to merge 20 commits intogirder:masterfrom
suhasthegame wants to merge 20 commits intogirder:masterfrom
Conversation
manthey
reviewed
Jan 10, 2024
| logger.info(f'Job {jobid} was cancelled by user.') | ||
| return JOB_STATUS.CANCELLED | ||
|
|
||
| time.sleep(5) # Sleep to avoid busy waiting |
Member
There was a problem hiding this comment.
I think it'd be better to call s.wait(5) and catch ExitTimeoutException.
manthey
reviewed
Jan 10, 2024
| bind_paths[temporary_directory] = '/output' | ||
| super().__call__(*args,**kwargs) | ||
|
|
||
| qos = kwargs.pop('qos', 'pinaki.sarder') |
Member
There was a problem hiding this comment.
I'd recommend having these from environment variables. And, rather than construct the slurm script ourselves, we could use the simple_slurm package to do it (it does the same thing, but has been validated by others and escapes command line parameters appropriately).
manthey
reviewed
Jan 10, 2024
| bind_option = ','.join([f"{host}:{container}" for host, container in bind_paths.items()]) | ||
|
|
||
| # Construct the Singularity command | ||
| singularity_command = f'singularity exec --bind {bind_option} docker://{image} {" ".join(container_args)}' |
Member
There was a problem hiding this comment.
The join is unsafe -- if the container args contain spaces or quotes or shell characters, odd things will happen.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.