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

Prefer system TMPDIR over project directory? #79

Open
rpetit3 opened this issue Jul 7, 2022 · 3 comments
Open

Prefer system TMPDIR over project directory? #79

rpetit3 opened this issue Jul 7, 2022 · 3 comments

Comments

@rpetit3
Copy link
Contributor

rpetit3 commented Jul 7, 2022

Currently, mycosnp-nf defaults --tmpdir to "$projectDir/tmp", which in cloud settings might be on a space limited partition.

I realize I can just do --tmpdir $TMPDIR , but would you consider setting the default to the system wide environment variable and falling back on the project directory in the event TMPDIR is not set?

Cheers,
Robert

@mciprianoCDC
Copy link
Contributor

I can look into how to implement this within nextflow, though this can end up causing more issues and would need testing in multiple environments. This setting came about due to the necessity of always having TMPDIR set else some modules will not work well, and often system tmpdirs are set as noexec (based on best security practices) or are space limited, which causes additional problems within workflows that are not always apparent to users. This can also necessitate additional documentation to point out these issues within the usage guide as well.

@rpetit3
Copy link
Contributor Author

rpetit3 commented Jul 11, 2022

Totally understand. I was thinking to reuse TMPDIR if it exists, otherwise use $projectDir. Something like:

tmpdir  = System.getenv("TMPDIR") ? "${TMPDIR}" : "$projectDir/tmp"

@jwarnn
Copy link
Contributor

jwarnn commented Aug 27, 2024

I've ran into this issue before and I am running into this issue currently where the cloud environment errors because java tools can't access a tmp directory. Previously I have created a tmp directory in the base of the repository, mycosnp-nf/tmp/, which resolves the issue. Would that be a useful PR request? I am currently having the issue when Nextflow tower as it directly pulls from the github repository.

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

3 participants