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

bids-mriqc not usable with datalad dataset #131

Open
bpinsard opened this issue Nov 1, 2024 · 6 comments · May be fixed by #133
Open

bids-mriqc not usable with datalad dataset #131

bpinsard opened this issue Nov 1, 2024 · 6 comments · May be fixed by #133

Comments

@bpinsard
Copy link
Collaborator

bpinsard commented Nov 1, 2024

same error for 23.1.1 and 24.0.2 (don't believe the logs for the version: nipreps/mriqc#1354 )

It seems that mriqc calls datalad even if all files were fetch beforehand outside of the container.

[INFO   ] == Command start (output follows) =====                                                                                                             
------------------------------------------------------------------
  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: /home/basile/data/tests/mriqc/sourcedata/bids.
  * Output folder: ..
  * Analysis levels: ['participant'].
------------------------------------------------------------------

2024-11-01 18:24:05 | IMPORTANT | mriqc            | DataLad dataset identified, attempting to `datalad get` unavailable files.
Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/mriqc/.cache/datalad/sockets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/mriqc/.cache/datalad'

During handling of the above exception, another exception occurred:

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 197, in _execute_command_
    hooks = get_jsonhooks_from_config(ds.config if ds else dlcfg)
                                      ^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/distribution/dataset.py", line 331, in config
    repo = self.repo
           ^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/distribution/dataset.py", line 273, in repo
    self._repo = repo_from_path(self._path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/core/local/repo.py", line 61, in repo_from_path
    repo = cls(path, create=False, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/dataset/repo.py", line 163, in __call__
    instance = type.__call__(cls, *new_args, **new_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/datalad/support/annexrepo.py", line 198, in __init__
    super(AnnexRepo, self).__init__(
  File "/opt/conda/lib/python3.11/site-packages/datalad/support/gitrepo.py", line 938, in __init__
    ssh_manager.ensure_initialized()
  File "/opt/conda/lib/python3.11/site-packages/datalad/support/sshconnector.py", line 738, in ensure_initialized
    self._socket_dir.mkdir(exist_ok=True, parents=True)
  File "/opt/conda/lib/python3.11/pathlib.py", line 1120, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
  File "/opt/conda/lib/python3.11/pathlib.py", line 1120, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
  File "/opt/conda/lib/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
OSError: [Errno 30] Read-only file system: '/home/mriqc/.cache'
[INFO   ] == Command exit (modification check follows) ===== 
@bpinsard
Copy link
Collaborator Author

bpinsard commented Nov 1, 2024

This behavior is only in MRIQC, no other nipreps tool AFAIK
So maybe we should set the repronim/containers datalad config to include --no-datalad-get by default, as datalad operations are supposed to be taken care of outside of the container in that setting.

@yarikoptic
Copy link
Member

So maybe we should set the repronim/containers datalad config to include --no-datalad-get by default, as datalad operations are supposed to be taken care of outside of the container in that setting.

indeed, let's just do that....

@bpinsard
Copy link
Collaborator Author

bpinsard commented Nov 1, 2024

ok I just have to find in which version that option was introduced

@bpinsard
Copy link
Collaborator Author

bpinsard commented Nov 1, 2024

nipreps/mriqc#1278 24.0.0, so the older versions in repronim/containers will remain broken unless this is backported. @oesteban

@yarikoptic
Copy link
Member

old versions would remain "as working" as they were used ;) (ppl might have bind-mounted things up etc). Let's fix current/new ones.

@yarikoptic
Copy link
Member

@bpinsard please check/review #133 (I sent an invite as well)

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