Skip to content

4 create docker imageinterface#5

Merged
mnoergaard merged 16 commits intomainfrom
4-create-docker-imageinterface
May 29, 2024
Merged

4 create docker imageinterface#5
mnoergaard merged 16 commits intomainfrom
4-create-docker-imageinterface

Conversation

@bendhouseart
Copy link
Collaborator

Adding docker support to this pipeline

@bendhouseart bendhouseart self-assigned this Mar 13, 2024
@bendhouseart bendhouseart linked an issue Mar 13, 2024 that may be closed by this pull request
3 tasks
@bendhouseart
Copy link
Collaborator Author

I would convert this to a draft, but that's a paid feature. Please don't merge this as it's not there just yet.

Returns the following error when run with --docker

"FileExistsError: [Errno 17] File exists: '/.cache/templateflow/tpl-VALiDATe29'"
@bendhouseart
Copy link
Collaborator Author

bendhouseart commented Mar 13, 2024

Alright, seems to be running "mostly" fine. Running into an error with templateflow, see below.

Given the following command:

python run.py --bids_dir ~/Data/sharing/test2 --output_dir ~/Data/sharing/test2/derivatives/petprep_extract_tacs --wm --n_procs 6 --petprep_hmc --docker

Returns this:

240313-17:21:12,24 nipype.workflow INFO:
         [Node] Finished "convert_brainmask", elapsed time 0.44942s.
240313-17:21:12,34 nipype.workflow INFO:
         [Node] Finished "convert_brainmask", elapsed time 0.466654s.
240313-17:21:12,437 nipype.workflow INFO:
         [Node] Finished "convert_wm_seg_file", elapsed time 0.868988s.
240313-17:21:12,450 nipype.workflow INFO:
         [Node] Finished "convert_wm_seg_file", elapsed time 0.884125s.
240313-17:21:13,508 nipype.workflow ERROR:
         Node create_weighted_average_pet.a0 failed to run on host adb5e6912ae8.
240313-17:21:13,508 nipype.workflow ERROR:
         Saving crash info to /workdir/crash-20240313-172113-UID331122-create_weighted_average_pet.a0-5acdf884-9649-454c-86d7-02bfc1e9d09a.pklz
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node create_weighted_average_pet.

Traceback:
        Traceback (most recent call last):
          File "/usr/local/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 397, in run
            runtime = self._run_interface(runtime)
          File "/usr/local/lib/python3.9/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
            out = function_handle(**args)
          File "<string>", line 4, in create_weighted_average_pet
          File "/usr/local/lib/python3.9/site-packages/niworkflows/interfaces/bids.py", line 52, in <module>
            import templateflow as tf
          File "/usr/local/lib/python3.9/site-packages/templateflow/__init__.py", line 18, in <module>
            from . import api
          File "/usr/local/lib/python3.9/site-packages/templateflow/api.py", line 8, in <module>
            from .conf import TF_LAYOUT, TF_S3_ROOT, TF_USE_DATALAD, requires_layout
          File "/usr/local/lib/python3.9/site-packages/templateflow/conf/__init__.py", line 53, in <module>
            _init_cache()
          File "/usr/local/lib/python3.9/site-packages/templateflow/conf/__init__.py", line 50, in _init_cache
            _update_s3(TF_HOME, local=True, overwrite=True)
          File "/usr/local/lib/python3.9/site-packages/templateflow/conf/_s3.py", line 19, in update
            retval = _update_skeleton(skel_file, dest, overwrite=overwrite, silent=silent)
          File "/usr/local/lib/python3.9/site-packages/templateflow/conf/_s3.py", line 54, in _update_skeleton
            zipref.extractall(str(dest))
          File "/usr/local/lib/python3.9/zipfile.py", line 1642, in extractall
            self._extract_member(zipinfo, path, pwd)
          File "/usr/local/lib/python3.9/zipfile.py", line 1692, in _extract_member
            os.mkdir(targetpath)
        FileExistsError: [Errno 17] File exists: '/.cache/templateflow/tpl-VALiDATe29'

Comment references commit a436604

@bendhouseart bendhouseart requested a review from mnoergaard April 18, 2024 16:01
@bendhouseart
Copy link
Collaborator Author

Fixed running in docker by switching over to a patched version of templateflow see fix -> templateflow/python-client#131

Trivial on the face of it, but took quite a while to track down and have the fix applied upstream at templateflow.

@mnoergaard mnoergaard merged commit 501b7bb into main May 29, 2024
@bendhouseart bendhouseart deleted the 4-create-docker-imageinterface branch November 8, 2024 20:14
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

Successfully merging this pull request may close these issues.

Create Docker Image/Interface

2 participants