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

apptainer / singularity version requirement #323

Open
celstark opened this issue Nov 7, 2024 · 1 comment
Open

apptainer / singularity version requirement #323

celstark opened this issue Nov 7, 2024 · 1 comment

Comments

@celstark
Copy link

celstark commented Nov 7, 2024

Running your container in apptainer 1.3.4 is just fine. Running it in 1.2.5 (or older versions of singularity) gives the following:

apptainer --version
apptainer version 1.2.5-1.el9

apptainer exec code/dcm2bids_3.2.0.sif dcm2bids --help
Traceback (most recent call last):
  File "/venv/bin/dcm2bids", line 5, in <module>
    from dcm2bids.cli.dcm2bids import main
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1322, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1262, in _find_spec
  File "/venv/lib/python3.12/site-packages/__editable___dcm2bids_3_2_0_finder.py", line 20, in find_spec
    return cls._find_spec(fullname, Path(pkg_path))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/__editable___dcm2bids_3_2_0_finder.py", line 38, in _find_spec
    if candidate.exists():
       ^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/pathlib.py", line 860, in exists
    self.stat(follow_symlinks=follow_symlinks)
  File "/venv/lib/python3.12/pathlib.py", line 840, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/dcm2bids/dcm2bids/__init__.py'

The prior 3.1.0 though was fine:

apptainer exec code/dcm2bids_3.1.0.sif dcm2bids --help
usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR] [--auto_extract_entities] [--bids_validate]
                [--force_dcm2bids] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v]

Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure

options:
  -h, --help            show this help message and exit
...

Note, it does run in the newer apptainer:

apptainer --version
apptainer version 1.3.4-1.el9

apptainer exec code/dcm2bids_3.1.0.sif dcm2bids --help
usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR] [--auto_extract_entities] [--bids_validate]
                [--force_dcm2bids] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v]

Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure

options:
  -h, --help            show this help message and exit
...
@arnaudbore
Copy link
Contributor

Thank you for the issue. I will check if I can make it work otherwise I will need to tell people to update apptainer.

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

No branches or pull requests

2 participants