ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
330 stars 97 forks source link

reprozip trace results in KeyError #166

Closed stebo85 closed 6 years ago

stebo85 commented 6 years ago

Dear Jakub,

I am trying to run reprozip trace in neurodocker version 0.4.0rc1, but get this error:

neurodocker reprozip trace dcm2mnc_reprozip "/home/neuro/run.sh" Traceback (most recent call last): File "/qrisvolume/miniconda3/bin/neurodocker", line 11, in load_entry_point('neurodocker==0.4.0rc1', 'console_scripts', 'neurodocker')() File "/qrisvolume/miniconda3/lib/python3.6/site-packages/neurodocker/neurodocker.py", line 348, in main subparser_functionsnamespace.subsubparser_name KeyError: 'trace'

Am I missing something obvious or is it a bug?

Thank you for any hint Steffen

kaczmarj commented 6 years ago

hi @stebo85 - this is indeed a bug. i've patched it and the readme example.

you can try it out by installing the current master branch

pip install -U https://github.com/kaczmarj/neurodocker/tarball/master
stebo85 commented 6 years ago

Hi Jakob,

Thank you for fixing the bug, but I still can't get it to work - it look like reprozip_trace_runner.sh is not included?

pip install -U https://github.com/kaczmarj/neurodocker/tarball/master Collecting https://github.com/kaczmarj/neurodocker/tarball/master Downloading https://github.com/kaczmarj/neurodocker/tarball/master (48kB) 100% |████████████████████████████████| 51kB 164kB/s Requirement not upgraded as not directly required: jinja2>=2.0 in /qrisvolume/miniconda3/lib/python3.6/site-packages (from neurodocker==0.4.0.dev2) (2.10) Requirement not upgraded as not directly required: PyYAML>=3.0 in /qrisvolume/miniconda3/lib/python3.6/site-packages (from neurodocker==0.4.0.dev2) (3.12) Requirement not upgraded as not directly required: MarkupSafe>=0.23 in /qrisvolume/miniconda3/lib/python3.6/site-packages (from jinja2>=2.0->neurodocker==0.4.0.dev2) (1.0) Building wheels for collected packages: neurodocker Running setup.py bdist_wheel for neurodocker ... done Stored in directory: /qrisvolume/tmp/pip-ephem-wheel-cache-0hswna19/wheels/92/d8/e4/e7eb1cae46502d37517c65f47c17a89dfa356c2bef21a066e3 Successfully built neurodocker Installing collected packages: neurodocker Found existing installation: neurodocker 0.4.0.dev2 Uninstalling neurodocker-0.4.0.dev2: Successfully uninstalled neurodocker-0.4.0.dev2 Successfully installed neurodocker-0.4.0.dev2

neurodocker reprozip trace ${imageName}_reprozip "$cmd1" Traceback (most recent call last): File "/qrisvolume/miniconda3/bin/neurodocker", line 11, in sys.exit(main()) File "/qrisvolume/miniconda3/lib/python3.6/site-packages/neurodocker/neurodocker.py", line 341, in main subparser_functionsnamespace.subsubparser_name File "/qrisvolume/miniconda3/lib/python3.6/site-packages/neurodocker/neurodocker.py", line 303, in reprozip_trace local_packfile_path = ReproZipMinimizer(**vars(namespace)).run() File "/qrisvolume/miniconda3/lib/python3.6/site-packages/neurodocker/reprozip/trace.py", line 180, in run copy_file_to_container(self.container, self.shell_filepath, '/tmp/') File "/qrisvolume/miniconda3/lib/python3.6/site-packages/neurodocker/reprozip/trace.py", line 84, in copy_file_to_container tar.add(src, arcname=filename, recursive=False) File "/qrisvolume/miniconda3/lib/python3.6/tarfile.py", line 1933, in add tarinfo = self.gettarinfo(name, arcname) File "/qrisvolume/miniconda3/lib/python3.6/tarfile.py", line 1802, in gettarinfo statres = os.lstat(name) FileNotFoundError: [Errno 2] No such file or directory: '/qrisvolume/miniconda3/lib/python3.6/site-packages/neurodocker/reprozip/utils/reprozip_trace_runner.sh'

kaczmarj commented 6 years ago

@stebo85 - thanks, i'll fix this bug in the morning, and i'll thoroughly test the fix :)

kaczmarj commented 6 years ago

@stebo85 - this should be fixed now, but please submit an issue (or reopen this one) if you run into more problems. thanks again.