Skip to content

add option to define SINGULARITY_TMPDIR#2483

Merged
boegel merged 3 commits intoeasybuilders:developfrom
migueldiascosta:singularity_tmp
Apr 25, 2018
Merged

add option to define SINGULARITY_TMPDIR#2483
boegel merged 3 commits intoeasybuilders:developfrom
migueldiascosta:singularity_tmp

Conversation

@migueldiascosta
Copy link
Member

Singularity defaults to building the images in /tmp (http://singularity.lbl.gov/build-environment#temporary-folders), which will fail if it is not large enough

Additionally, this environment variable must be defined in the root shell where singularity is run, via sudo.

This adds options to define the path as passes it to singularity.

cc @shahzebsiddiqui @boegel

migueldiascosta and others added 2 commits April 25, 2018 10:03
…th --tmpdir), take into account that it may not be specified + enhance tests
singularity = which('singularity')

cmd = "sudo %s build %s %s %s" % (singularity, cmd_opts, img_path, def_path)
singularity_tmp = build_option('container_tmp_path')
Copy link
Member

Choose a reason for hiding this comment

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

@migueldiascosta What if this is not specified, you'll inject SINGULARITY_TMPDIR=None into the command?

Fixes in migueldiascosta#1

Copy link
Member Author

Choose a reason for hiding this comment

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

@boegel you're right, I assumed it would be empty and singularity would default to /tmp (and thought I had tested it but apparently hadn't)

--container-tmpdir fix + test
@boegel boegel added this to the 3.6.0 milestone Apr 25, 2018
@boegel
Copy link
Member

boegel commented Apr 25, 2018

Thanks @migueldiascosta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants