Singularity temp folder

How do I define a different temp folder when dealing with Singularity images? Our Singularity images are stored on CVMFS which is mounted on different computing system in a read-only mode.

I set the CWL_SINGULARITY_CACHE=/cvmfs/ so that the images can be found, but when running cwl-runner with --singularity and the --tmp-outdir-prefix and --tmpdir-prefix settings, it still tries to write to the that location which of course fails…

It seems that tmpdir and tmp-outdir are not used to deal with the Singularity image.

░ tgal@cca004:/sps/km3net/users/tgal/dev/pipelines  venv@master ●
░ 11:43:39 > cwl-runner --tmp-outdir-prefix=$PWD/tmp --tmpdir-prefix=$PWD/tmp --singularity tools/mupage.cwl examples/mupage-job.yml
INFO /pbs/throng/km3net/software/python/3.7.5/bin/cwl-runner 1.0.20191022103248
INFO Resolved 'tools/mupage.cwl' to 'file:///sps/km3net/users/tgal/dev/pipelines/tools/mupage.cwl'
INFO ['singularity', 'pull', '--force', '--name', '/cvmfs/', 'docker://']
INFO:    Using cached SIF image
FATAL:   While making image from oci registry: error copying image out of cache: could not open temporary file for copy: failed to create temporary file: open /cvmfs/ read-only file system
ERROR Workflow error, try again with --debug for more information:
Singularity is not available for this tool, try --no-container to disable Singularity, or install a user space Docker replacement like uDocker with --user-space-docker-cmd.: Command '['singularity', 'pull', '--force', '--name', '/cvmfs/', 'docker://']' returned non-zero exit status 255.