Sam Wilkinson
04/23/2026, 1:19 PMJim Downie
04/23/2026, 1:33 PMenv("VAR_NAME")
should do it, I thinkSam Wilkinson
04/23/2026, 1:34 PMThomas Danhorn
04/23/2026, 3:52 PMsingularity {
enabled = true
// /tmp is often too small -> redirect to scratch:
runOptions = "-B /scratch/$USER:/tmp"
}
env {
SINGULARITY_TMPDIR = "/scratch/$USER/singularity/tmp"
SINGULARITY_CACHEDIR = "/scratch/$USER/singularity/cache"
}
(Obviously that works also with other variables besides $USER, these are just my use cases.) Be sure to to use double quotes to ensure expansion.Sam Wilkinson
04/23/2026, 4:20 PMThomas Danhorn
04/23/2026, 4:25 PM$USER is not likely to change over the run of a pipeline, but $HOSTNAME is likely different between the point where you start the pipeline and where a particular process is run. I think you can use closures ({ ... }) to control that.Sam Wilkinson
04/23/2026, 4:27 PMArthur
04/23/2026, 10:50 PMsystem.getEnv or env (docs - I think they are a bit confusing on the new best practice though personally)