FCP-INDI / cpac

A convenience wrapper for https://github.com/FCP-INDI/C-PAC that provides a simple command line interface.
https://fcp-indi.github.io/docs/latest/user/cpac
MIT License
4 stars 3 forks source link

🐛 Could not find the file `/cpac_resources/default_pipeline.yml` in container #35

Closed neurosurd closed 5 months ago

neurosurd commented 1 year ago

Describe the bug

Could not find the file /cpac_resources/default_pipeline.yml in container

To reproduce

Hi All, I tried to run cpac using the following command

cpac --platform docker --tag nightly run /home/user3/mox_study/bids_mox /home/user3/mox_study/cpacoutput participant --participant_label mox2769 --working_dir /home/user3/mox_study/cpacwork --preconfig preproc --vv

However, it gave me the error below. Ive tried various other preconfig pipelines and cpac versions but i still get the same error. I installed the latest cpac wrapper via pip 3.6 earlier.

Error:

Loading 🐳 Docker
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.41/containers/c1b5a72741e24b5eabee508ca854a27d2d5b7db3a2d9a3b9ee9647ba58fb30e5/archive?path=%2Fcpac_resources%2Fdefault_pipeline.yml

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/cpac", line 8, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.6/site-packages/cpac/__main__.py", line 403, in run
    main(parsed)
  File "/usr/local/lib/python3.6/site-packages/cpac/__main__.py", line 307, in main
    Backends(**arg_vars).run(
  File "/usr/local/lib/python3.6/site-packages/cpac/backends/__init__.py", line 27, in Backends
    }[platform](**kwargs)
  File "/usr/local/lib/python3.6/site-packages/cpac/backends/docker.py", line 33, in __init__
    self._collect_config(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/cpac/backends/docker.py", line 61, in _collect_config
    stream = container.get_archive(path=self.pipeline_config)[0]
  File "/usr/local/lib/python3.6/site-packages/docker/models/containers.py", line 262, in get_archive
    chunk_size, encode_stream)
  File "/usr/local/lib/python3.6/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/docker/api/container.py", line 748, in get_archive
    self._raise_for_status(res)
  File "/usr/local/lib/python3.6/site-packages/docker/api/client.py", line 270, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/usr/local/lib/python3.6/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.NotFound: 404 Client Error for http+docker://localhost/v1.41/containers/c1b5a72741e24b5eabee508ca854a27d2d5b7db3a2d9a3b9ee9647ba58fb30e5/archive?path=%2Fcpac_resources%2Fdefault_pipeline.yml: Not Found ("Could not find the file /cpac_resources/default_pipeline.yml in container c1b5a72741e24b5eabee508ca854a27d2d5b7db3a2d9a3b9ee9647ba58fb30e5")

Preconfig

Expected behavior

..

Acceptance criteria

..

C-PAC version

nightly

Container platform

Docker

Docker and/or Singularity version(s)

Docker version 20.10.18, build b40c2f6

shnizzedy commented 1 year ago

Hi @neurosurd, thanks for bringing this issue to our attention. The issue is due to some refactoring that is present in the nightly C-PAC image that isn't yet accounted for in the cpac Python package. We've got a fix started and we'll let you know when you can upgrade your wrapper to get the fix.

tjlagrow commented 1 year ago

This is the same for the latest release (8 days ago) of the docker image as well.

tjlagrow commented 1 year ago

I was able to resolve my issue by using --preconfig default flag.

shnizzedy commented 5 months ago

In 1.8.5