Problem setting singularity cache dir

477 views
Skip to first unread message

Edoardo Giacopuzzi

unread,
Jan 26, 2021, 3:18:42 AM1/26/21
to Nextflow
Hi,

I'm trying to properly set up singularity cache directory in the nextflow configuration for my pipeline so that images downloaded from a repository go to a specific folder, but I can get it to work as expected.

In my configuration I have

singularity: {
  cacheDir: '/my/cache/location/'
}

When I run the pipeline the images pulled from the remote repository are correctly saved in the specified location, but it seems that temporary files are created anyway in the default singularity cache dir ($HOME/.singularity). This causes issues since the space available for the home folder is limited in my cluster. Basically, the pipeline crashes at some point since unable to download new containers due to the storage quota exceeded.

I've tried to add this to edit my configuration adding some env variables 

singularity: {
  cacheDir: '/my/cache/location/'
}
env {
  SINGULARITY_CACHEDIR = "/location/for/cache"
  SINGULARITY_TMPDIR = "/location/for/tmp"
}

But the result is the same (final images downloaded to the singularity.cacheDir, but data also in $HOME/.singularity). 

Any suggestion on how to set configuration properly so that singularity would only write data in the specified location doing nothing in the home folder?

Thanks!

Paolo Di Tommaso

unread,
Jan 27, 2021, 9:12:01 AM1/27/21
to nextflow
The `env` scope it's only for tasks executed by NF not for configuring nextflow itself. Therefore the singularity variables needs to be defined in the host environment. 

p

--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nextflow/a47176d0-e48e-48b6-ad57-b38dbf989f1bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages