Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker documentation #1363

Closed
mckenziephagen opened this issue Dec 4, 2024 · 3 comments
Closed

Docker documentation #1363

mckenziephagen opened this issue Dec 4, 2024 · 3 comments

Comments

@mckenziephagen
Copy link
Collaborator

mckenziephagen commented Dec 4, 2024

What would you like changed/added and why?

With the update of MRIQC enabled to incorporate datalad and be able to pull data down from OpenNeuro using datalad, the Docker instructions with the :ro (readonly) tag for the BIDS directory volume fail. I don't have the exact error message currently (macOS update woes), but it was something along the lines of trying to download on a read only filesystem.

I can update the documentation, as long as there's no potential problems with dropping the :ro in the volume binding for the BIDS directory.

Do you have any interest in helping improve the documentation?

Yes

Do you have any suggestions for the new documents?

@oesteban tagging for your thoughts.
No response

@mckenziephagen
Copy link
Collaborator Author

Full output/error.

(new_dl) kenziepaige@MacBook-Pro-209 MRIQC % docker run -it --rm -v $bids_dir:/data:ro -v $output_dir:/out nipreps/mriqc:latest /data /out participant --participant_label 0010
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
------------------------------------------------------------------
  Running MRIQC version 24.1.0.dev0+gd5b13cb5.d20240826
  ----------------------------------------------------------------

  NOTICE
  Copyright © The NiPreps Developers.
  
  This product includes software developed by
  the NiPreps Community (https://nipreps.org/).
  
  Portions of this software were developed at the Department of
  Psychology at Stanford University, Stanford, CA, US.
  
  This software contains code ultimately derived from the
  PCP Quality Assessment Protocol (QAP;
  http://preprocessed-connectomes-project.org/quality-assessment-protocol)
  by C. Craddock, S. Giavasis, D. Clark, Z. Shezhad, and J. Pellman.
  
  This software is also distributed as a Docker container image.
  The bootstrapping file for the image ("Dockerfile") is licensed
  under the MIT License.

  ----------------------------------------------------------------

  * BIDS dataset path: /data.
  * Output folder: /out.
  * Analysis levels: ['participant'].
------------------------------------------------------------------

2024-12-05 00:29:21 | IMPORTANT | mriqc            | DataLad dataset identified, attempting to `datalad get` unavailable files.
get(error): sub-0010/func/sub-0010_task-gstroop_acq-seq_bold.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/func/sub-0010_task-anticipation_acq-seq_bold.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/func/sub-0010_task-restingstate_acq-mb3_bold.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/func/sub-0010_task-faces_acq-mb3_bold.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/dwi/sub-0010_dwi.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/anat/sub-0010_T1w.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/func/sub-0010_task-emomatching_acq-seq_bold.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
get(error): sub-0010/func/sub-0010_task-workingmemory_acq-seq_bold.nii.gz (file) [git-annex: .git/annex/tmp: createDirectory: permission denied (Read-only file system)]
action summary:
  get (error: 8)
Traceback (most recent call last):
  File "/opt/conda/bin/mriqc", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/mriqc/cli/run.py", line 43, in main
    parse_args(argv)
  File "/opt/conda/lib/python3.11/site-packages/mriqc/cli/parser.py", line 658, in parse_args
    initialize_meta_and_data()
  File "/opt/conda/lib/python3.11/site-packages/mriqc/utils/misc.py", line 447, in initialize_meta_and_data
    _datalad_get(dataset)
  File "/opt/conda/lib/python3.11/site-packages/mriqc/utils/misc.py", line 282, in _datalad_get
    return get(
           ^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/interface/base.py", line 773, in eval_func
    return return_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/interface/base.py", line 763, in return_func
    results = list(results)
              ^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad_next/patches/interface_utils.py", line 287, in _execute_command_
    raise IncompleteResultsError(
datalad.support.exceptions.IncompleteResultsError: Command did not complete successfully. 8 failed:
[{'action': 'get',
  'annexkey': 'MD5E-s76037251--344f061a3165c71e36b98ad1649c3c8c.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/func/sub-0010_task-gstroop_acq-seq_bold.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s62372280--f49e3ef7ef162eac055c6e683720584b.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/func/sub-0010_task-anticipation_acq-seq_bold.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s147699014--93fa2960425581fa03a1f5fcad7cf2c6.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/func/sub-0010_task-restingstate_acq-mb3_bold.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s266328294--5cfe464f08b38cfcb20d4d9977db7057.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/func/sub-0010_task-faces_acq-mb3_bold.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s13773098--1a0ea41fbc2a9d6f3637fd9a4dfced0c.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/dwi/sub-0010_dwi.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s5889514--b3711e82a17c752c68588fefb72b36fe.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/anat/sub-0010_T1w.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s41518453--988ea169d4f0440b8395f45f1e7b59a0.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/func/sub-0010_task-emomatching_acq-seq_bold.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'},
 {'action': 'get',
  'annexkey': 'MD5E-s50284854--53b20ac38249161182afb5f96a99ade3.nii.gz',
  'error_message': 'git-annex: .git/annex/tmp: createDirectory: permission '
                   'denied (Read-only file system)',
  'path': '/data/sub-0010/func/sub-0010_task-workingmemory_acq-seq_bold.nii.gz',
  'refds': '/data',
  'status': 'error',
  'type': 'file'}]

Leaving off the :ro runs without problems.

@oesteban
Copy link
Member

oesteban commented Dec 6, 2024

Thanks! Yes, we do need to update the documentation. I think the right way to do this is: (i) keep the recommendation of :ro, but (ii) extend it to say that, if you plan to use datalad and have MRIQC datalad-get data, then of course you need to download the data somewhere and that somewhere cannot be protected with :ro.

Another thing that you are not reporting here and IS NOT in the docs, is that you want to run docker with a given user (and potentially group). That can be done with -u and -g.

The nipreps' docs are here https://www.nipreps.org/apps/docker/, probably worth updating there and reducing anything there is in MRIQC's docs to a link to this page.

@oesteban
Copy link
Member

Closing as this has been addressed with #1367 and nipreps/nipreps.github.io#47.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants