-
Notifications
You must be signed in to change notification settings - Fork 643
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
Resolve relative paths against the work dir #2661
Comments
I believe Tower by default launches from the root directory, then moves the log files into the work directory. So launching from the work directory would be much better also so that the log files aren't lost if the head node is killed suddenly. But is the idea to resolve against the work directory only in specific cases, like if the executor is |
Yes, this is why I think making |
This is happening because Nextflow resolves relative paths against the current working directory. When running it in a classic grid HPC, this usually corresponds to a subdirectory of the user home. When running to Batch or other containerised environments, this is going to be a path into the container file system, with results into the above counterintuitive condition. Think this could be addressed by introducing an env setting e.g. |
It would be nice to have a config option for this as well as an env setting. Or would you suggest using something like this instead @pditommaso? env {
NXF_RELATIVE_FILE_BASE = "s3://my_bucket/"
} Another use case that has come up a couple of times recently in the context of AWS Batch (cc @BrunoGrandePhD) is to dynamically output the results relative to |
Looking at that
☮️ ❤️ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We neeeeeeddddd this! |
Solved by #3942 |
Using nf-core pipelines as an example, by default we set
--outdir ./results
which is fine for shared file systems / HPC environments but with the growing adoption of Cloud this doesn't work anymore and can end up costing money and time if an absolute path isn't provided instead of a relative one. For example, on AWS Batch, by default the results will get written to the head node and are lost with it.More details in nf-core/tools#1415
As you mentioned in nf-core/tools#1415 (comment) @pditommaso
On AWS Batch, by default, isn't the work-dir and launch dir the same i.e. scratch space on the Head node?
I wonder whether this would still be a problem if the intention of the user is to put the results in a different bucket altogether? In which case, making
--outdir
mandatory would make them think about this beforehand (but this is quite specific to nf-core pipelines).The text was updated successfully, but these errors were encountered: