Read-only error in mriqc using singularity on cluster

Hi all,

Trying to run mriqc on our cluster.
I have used docker2singularity on my local machine and used that image to run mriqc using Singularity 2.5.1. Kept running into errors like

OSError: [Errno 30] Read-only file system: ‘/exports’

Thought it had something to do with conflicts between being root user.

However, now a root user of the HPC made an mriqc image using docker2singularity and then tried to run mriqc but we get the same error:

singularity run ./new-poldracklab_mriqc_latest-2018-06-05-b32259bb8a5d.img exports/MRIQC/ /exports/MRIQC/output participant --participant_label 0392 -w /exports/MRIQC/output --n_procs 8
/usr/local/miniconda/lib/python3.6/site-packages/sklearn/externals/joblib/_multiprocessing_helpers.py:28:
UserWarning: [Errno 2] No such file or directory. joblib will operate in serial mode
warnings.warn(’%s. joblib will operate in serial mode’ % (e,))
Traceback (most recent call last):
File “/usr/local/miniconda/bin/mriqc”, line 11, in
load_entry_point(‘mriqc==0.11.0’, ‘console_scripts’, ‘mriqc’)()
File “/usr/local/miniconda/lib/python3.6/site-
packages/mriqc/bin/mriqc_run.py”, line 231, in main
check_folder(settings[‘output_dir’])
File “/usr/local/miniconda/lib/python3.6/site-
packages/mriqc/utils/misc.py”, line 46, in check_folder
os.makedirs(folder)
File “/usr/local/miniconda/lib/python3.6/os.py”, line 210, in
makedirs
makedirs(head, mode, exist_ok)
File “/usr/local/miniconda/lib/python3.6/os.py”, line 210, in
makedirs
makedirs(head, mode, exist_ok)
File “/usr/local/miniconda/lib/python3.6/os.py”, line 210, in
makedirs
makedirs(head, mode, exist_ok)
File “/usr/local/miniconda/lib/python3.6/os.py”, line 220, in
makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: ‘/exports’

When the root user does the same with fmriprep (pulling image and running it) it works fine. So can anyone help with what could be the problem here? Seems to be something specific in the mriqc image.

Thanks, Eduard

The problem you are running into concerns mounting of host folders into the container. Some system do it automatically for users and some require users to do it manually. You can do it wit -B singularity flag:

singularity run -B /exports:/exports ./new-poldracklab_mriqc_latest-2018-06-05-b32259bb8a5d.img /exports/MRIQC/ /exports/MRIQC/output participant --participant_label 0392 -w /exports/MRIQC/output --n_procs 8

If this does not work (singularity on your system might be configured in a way that does not allow creation of mountpoints inside the container dynamically) you will have to recreate the container with -m flag. See https://github.com/singularityware/docker2singularity#my-clusterhpc-requires-singularity-images-to-include-specific-mount-points for more details:

 docker run \        
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v D:\host\path\where\to\output\singularity\image:/output \
 --privileged -t --rm \
 singularityware/docker2singularity \            
 -m "/exports" \
 poldracklab/mriqc

BTW it seems that the version of singularity you are using might be recent enough to try to build the singularity image on the cluster instead of docker2singularity:

singularity build /path/where/you/want/to/store/container/images/mriqc-0.11.0.simg docker://poldracklab/mriqc:0.11.0

Great, thank you so much! Finally got it running after a bit of tweaking settings and dirs. The -B flag did the job.

1 Like