Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added code to support Singularity on HiperGator #389

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

suhasthegame
Copy link

No description provided.

logger.info(f'Job {jobid} was cancelled by user.')
return JOB_STATUS.CANCELLED

time.sleep(5) # Sleep to avoid busy waiting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be better to call s.wait(5) and catch ExitTimeoutException.

bind_paths[temporary_directory] = '/output'
super().__call__(*args,**kwargs)

qos = kwargs.pop('qos', 'pinaki.sarder')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

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)}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The join is unsafe -- if the container args contain spaces or quotes or shell characters, odd things will happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants