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

run.command(): Move temporary file directory #1405

Closed
Lestropie opened this issue Jul 19, 2018 · 1 comment
Closed

run.command(): Move temporary file directory #1405

Lestropie opened this issue Jul 19, 2018 · 1 comment
Labels

Comments

@Lestropie
Copy link
Member

Proposed solution for issue reported on forum.

  • Allow the temporary file directory MR::File::tmpfile_dir() to be set via an environment variable.

  • Within the mrtrix3.run module, set this environment variable to be the temporary directory created for the script: app.tempDir.

Piped images generated during run.command() calls will be created in the script's temporary directory rather than e.g. /tmp/, and will additionally be deleted as soon as the piped command is completed.

@jdtournier
Copy link
Member

Allow the temporary file directory MR::File::tmpfile_dir() to be set via an environment variable.

Was already suggested in #1033. I don't know why we didn't follow up with it, it's a trivial addition, and makes sense.

Within the mrtrix3.run module, set this environment variable to be the temporary directory created for the script: app.tempDir.

I don't like the idea much, but I have to concede that this is likely to be the most sensible default for now...

Lestropie added a commit that referenced this issue Jul 21, 2018
- New environment variable MRTRIX_TMPFILE_DIR, which has precedence over the MRtrix config file in setting the location of the temporary directory used for piped images. If this is not set, environment variable TMPDIR will also be tested and used if set.
- In Python scripts, use environment variable MRTRIX_TMPFILE_DIR to instruct any invoked MRtrix commands to place piped images within the temporary directory created by the Python library, rather than the default location.
Closes #1033.
Closes #1405.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants