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

set HOME, TMPDIR, TEMP, TMP sensibly inside container #674

Open
o-smirnov opened this issue Sep 14, 2020 · 3 comments
Open

set HOME, TMPDIR, TEMP, TMP sensibly inside container #674

o-smirnov opened this issue Sep 14, 2020 · 3 comments
Assignees

Comments

@o-smirnov
Copy link
Collaborator

The discussions in caracal-pipeline/caracal#1200 and ratt-ru/ragavi#78 highlight the fact that some packages are naughty, and like to open temp files in locations different to the nominal output directory -- which may be on a different filesystem even, thus causing strange IO errors such as "no space on device".

Stimela can be defensive about this: set HOME, TMPDIR, TEMP and TMP inside the container to the output directory, so that these problems are preempted.

@Mulan-94
Copy link
Collaborator

Mulan-94 commented Sep 14, 2020

@o-smirnov, so I shouldn't change this in ragavi?

@gigjozsa
Copy link
Collaborator

This would be great but it is hard to do it consistently as some software is even naughtier and hardcodes e.g. $HOME as /home/$USER, and then it would be great to provide some variables to redirect those directories (consistently) elsewhere (if for some reason those places are not the desired ones, if you e.g. want to share them across users), and put a big warning somewhere. Currently, for example in caratekit the user can temporarily redefine $HOME or some singularity folders, and that would be affected by a redirecting policy.

@o-smirnov
Copy link
Collaborator Author

Well, naughty software will always be cleverer than us, and this suggestion isn't a silver bullet. But just because it's not 100% foolproof doesn't mean it's not worth doing. It's simple and it protects from some naughtiness. For example, it will make us play nice with all software that relies on Python's tempfile module.

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

No branches or pull requests

4 participants