neurodocker icon indicating copy to clipboard operation
neurodocker copied to clipboard

Error while minimizing bids/freesurfer

Open kaurbhupinder opened this issue 6 years ago • 3 comments

I am trying to minimize bids/freesurfer image and I am using this dataset. Constantly getting below error.Any help will be much appreciated. Thanks in advance

[NEURODOCKER 2019-12-02 10:53:31,341 INFO]: Traceback (most recent call last):
  File "run.py", line 121, in <module>
    run("bids-validator {bids_dir}".format(bids_dir=args.bids_dir))
  File "run.py", line 27, in run
    raise Exception("Non zero return code: %d" % process.returncode)
Exception: Non zero return code: 1
[NEURODOCKER 2019-12-02 10:53:31,439 INFO]: [REPROZIP] 15:53:31.438 WARNING: Program exited with non-zero code 1
[NEURODOCKER 2019-12-02 10:53:33,723 INFO]: Uploading usage statistics is currently disabled
Please help us by providing anonymous usage statistics; you can enable this
by running:
    reprozip usage_report --enable
If you do not want to see this message again, you can run:
    reprozip usage_report --disable
Nothing will be uploaded before you opt in.
[NEURODOCKER 2019-12-02 10:53:33,724 INFO]: Configuration file written in /tmp/neurodocker-reprozip-trace/config.yml
Edit that file then run the packer -- use 'reprozip pack -h' for help
[NEURODOCKER 2019-12-02 10:53:33,753 INFO]: NEURODOCKER (in container): ERROR: reprozip trace command exited with non-zero code. Command: /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite python3 run.py /data/BMB_1 /outputs participant --participant_label 0003001 --license_file license.txt
Traceback (most recent call last):
  File "/home/bhupinder/venv3/bin/ndminify", line 10, in <module>
    sys.exit(main())
  File "/home/bhupinder/venv3/lib/python3.6/site-packages/neurodocker/reprozip/gentle/trace.py", line 169, in main
    trace_and_prune(container=args.container, commands=args.commands, directories_to_prune=args.dirs_to_prune)
  File "/home/bhupinder/venv3/lib/python3.6/site-packages/neurodocker/reprozip/gentle/trace.py", line 86, in trace_and_prune
    raise RuntimeError("Error: {}".format(log))
RuntimeError: Error: NEURODOCKER (in container): ERROR: reprozip trace command exited with non-zero code. Command: /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite python3 run.py /data/BMB_1 /outputs participant --participant_label 0003001 --license_file license.txt

kaurbhupinder avatar Dec 02 '19 16:12 kaurbhupinder

hi @kaurbhupinder - thanks for the report. can you show me how you would run the following command interactive (ie without tracing), beginning from the docker run step?

python3 run.py /data/BMB_1 /outputs participant --participant_label 0003001 --license_file license.txt

kaczmarj avatar Jan 10 '20 03:01 kaczmarj

@kaczmarj thanks for your reply. Please find all the steps below that I will follow.

  1. export DOCKER_FLAG='-v /home/bhupinder/BMB_1:/data:ro -v /home/bhupinder/outputs:/outputs -v /home/bhupinder/license.txt:/license.txt'
  2. docker run --rm -it --entrypoint="bash" --name surfer --security-opt seccomp=unconfined $DOCKER_FLAG bids/freesurfer
  3. python3 /run.py /data /outputs participant --participant_label 0003001 0003002 --license_file /license.txt'
  4. python3 /run.py /data /outputs group1 --participant_label 0003001 0003002 --license_file /license.txt'
  5. python3 /run.py /data /outputs group2 --participant_label 0003001 0003002 --license_file /license.txt'

kaurbhupinder avatar Jan 13 '20 16:01 kaurbhupinder

Hi, I could potentially be running into a similar problem with minify, I am running the following command, first activate a conda environment, then run a python code that uses nipype command line interfaces:

neurodocker-minify --container pipeline --dirs-to-prune /opt --commands "source activate tracts" "python /rpe_all/code/preprocess_rpe_all.py"

And I am receiving the following error:

[NEURODOCKER 2020-07-06 10:24:21,817 INFO]: + echo 'NEURODOCKER (in container): running reprozip trace command(s)'
+ run_reprozip_trace 'source activate tracts' 'python /rpe_all/code/preprocess_rpe_all.py'
+ cmds=("$@")
+ reprozip_base_cmd='/tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages'
+ for cmd in "${cmds[@]}"
+ '[' 'source activate tracts' == 'source activate tracts' ']'
+ continue_=--overwrite
+ reprozip_cmd='/tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite source activate tracts'
+ printf 'NEURODOCKER (in container): executing command: /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite source activate tracts\n'
+ /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite source activate tracts
[NEURODOCKER 2020-07-06 10:24:21,817 INFO]: NEURODOCKER (in container): running reprozip trace command(s)
NEURODOCKER (in container): executing command: /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite source activate tracts
[NEURODOCKER 2020-07-06 10:24:22,362 INFO]: [REPROZIP] 14:24:22.386 CRITICAL: couldn't execute the target command (execvp returned): No such file or directory
[NEURODOCKER 2020-07-06 10:24:22,379 INFO]: [REPROZIP] 14:24:22.405 WARNING: Program exited with non-zero code 127
[NEURODOCKER 2020-07-06 10:24:22,472 INFO]: Uploading usage statistics is currently disabled
Please help us by providing anonymous usage statistics; you can enable this
by running:
    reprozip usage_report --enable
If you do not want to see this message again, you can run:
    reprozip usage_report --disable
Nothing will be uploaded before you opt in.
[NEURODOCKER 2020-07-06 10:24:22,472 INFO]: Configuration file written in /tmp/neurodocker-reprozip-trace/config.yml
Edit that file then run the packer -- use 'reprozip pack -h' for help
[NEURODOCKER 2020-07-06 10:24:22,542 INFO]: NEURODOCKER (in container): ERROR: reprozip trace command exited with non-zero code. Command: /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite source activate tracts
Traceback (most recent call last):
  File "/Users/xxie/miniconda3/envs/tracts/bin/neurodocker-minify", line 8, in <module>
    sys.exit(main())
  File "/Users/xxie/miniconda3/envs/tracts/lib/python3.7/site-packages/neurodocker/reprozip/gentle/trace.py", line 169, in main
    trace_and_prune(container=args.container, commands=args.commands, directories_to_prune=args.dirs_to_prune)
  File "/Users/xxie/miniconda3/envs/tracts/lib/python3.7/site-packages/neurodocker/reprozip/gentle/trace.py", line 86, in trace_and_prune
    raise RuntimeError("Error: {}".format(log))
RuntimeError: Error: NEURODOCKER (in container): ERROR: reprozip trace command exited with non-zero code. Command: /tmp/reprozip-miniconda/bin/reprozip trace -d /tmp/neurodocker-reprozip-trace --dont-identify-packages --overwrite source activate tracts

Without tracing, I would start an interactive docker container and then just run the 2 commands I have:

  1. source activate tracts
  2. python /rpe_all/code/preprocess_rpe_all.py

Please let me know if you need more info :) thanks

axiezai avatar Jul 06 '20 14:07 axiezai

if this is still an issue, please feel free to reopen

djarecka avatar Mar 29 '23 17:03 djarecka