Lara Ianov
08/27/2024, 9:44 PM$HOME, and there is currently no parameter within the tool to change this location.
We can get around this by enabling the following before the nextflow run command - export NXF_SINGULARITY_HOME_MOUNT=true. This solves the issue, but I am unsure if there is way for us to streamline this process to users? Or is this just a matter of adding this need in the docs (I noted pixelator has done at the README: https://github.com/nf-core/pixelator)
Since Nextflow 23.07.0-edge, Nextflow no longer mounts the host's home directory when using Apptainer or Singularity. This causes issues in some dependencies. As a workaround, you can revert to the old behavior by setting the environment variableAny feedback is appreciated on what is best for the nf-core community.orNXF_APPTAINER_HOME_MOUNTtoNXF_SINGULARITY_HOME_MOUNTin the machine from which you launch the pipeline.true
Lara Ianov
08/28/2024, 2:55 PMNicolas Vannieuwkerke
08/28/2024, 3:01 PMPhil Ewels
08/28/2024, 3:02 PMNicolas Vannieuwkerke
08/28/2024, 3:02 PMPhil Ewels
08/28/2024, 3:03 PMPhil Ewels
08/28/2024, 3:03 PMLara Ianov
08/28/2024, 3:06 PMLara Ianov
08/28/2024, 3:07 PMOSError: [Errno 30] Read-only file system: '/home/lianov/.config' as an examplePhil Ewels
08/28/2024, 3:08 PMPhil Ewels
08/28/2024, 3:08 PM$HOME inside the container to a path within the work directory, which is writeable 🤔Lara Ianov
08/28/2024, 3:08 PMLara Ianov
08/28/2024, 3:12 PMJúlia Mir
08/28/2024, 3:16 PMexport NXF_SINGULARITY_HOME_MOUNT=truePhil Ewels
08/28/2024, 6:29 PMPhil Ewels
08/28/2024, 6:31 PMLara Ianov
08/28/2024, 7:46 PMPhil Ewels
08/28/2024, 8:23 PMLara Ianov
08/28/2024, 9:06 PMcontainerOptions "--bind ${task.workDir}:/home"
to IsoQuant’s process now adds the directory it writes to nextflow’s work dir (e.g.: scnanoseq/work/lianov/76/6dac21..../.config/IsoQuant )
So that seems to do the trick for me. @Júlia Mir Is this something you have tried?Júlia Mir
08/29/2024, 7:16 AMLara Ianov
08/29/2024, 6:29 PMcontainerOptions "${workflow.containerEngine == 'docker' ?
'--mount type=bind,source=' + task.workDir.toString() + ',target=/home' :
'--bind ' + task.workDir.toString() + ':/home'}"
That being I did cross post this in #CKDDD9JB0 as suggested by Phil to see if we had additional options to work with (https://nfcore.slack.com/archives/CKDDD9JB0/p1724879621376119).
One solution that also works and I think more simple than the above is in the reply - to add export HOME=\$(pwd) to the script section of the process. This seemed to work fine on my quick test and was suggested to be the better solution for pipeline maintainers. I am doing a few other tests, but don’t see why this shouldn’t work across the board (and this way we are not dealing with container specific syntax).