I used the preprocessing code in dm-preprocess-png docker image but received parallel command not found error from this line: find $IMAGES_DIRECTORY/ -name "*.dcm" | parallel --will-cite "convert {} -resize 500x500! $PREPROCESS_IMAGES_DIRECTORY/{/.}.png" # faster than mogrify

Created by Zafer Aydin zaferaydin
It's something that I have noticed in the past: `--will-cite` is a new option available in the version of parallel that I'm using for the example (2016), however it's not available in the 2014 version that you have installed as you saw using `--help`.
BTW I have this message in STDERR (not sure whether this is a warning or error though):   STDERR: parallel: Warning: $SHELL not set. Using /bin/sh. STDERR: Unknown option: will-cite STDERR: Unknown option: will-cite   When I pull the docker image and type parallel \--will-cite I get   parallel: Warning: $SHELL not set. Using /bin/sh. Unknown option: will-cite Unknown option: will-cite   and when I type parallel \--help I get   parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))... cat ... | parallel \--pipe [options] [command [arguments]] -j n Run n jobs in parallel -k Keep same order -X Multiple arguments with context replace \--colsep regexp Split input on regexp for positional replacements {} {.} {/} {/.} {#} Replacement strings {3} {3.} {3/} {3/.} Positional replacement strings -S sshlogin Example: foo@server.example.com \--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins \--trc {}.bar Shorthand for \--transfer \--return {}.bar \--cleanup \--onall Run the given command with argument on all sshlogins \--nonall Run the given command with no arguments on all sshlogins \--pipe Split stdin (standard input) to multiple jobs. \--recend str Record end separator for \--pipe. \--recstart str Record start separator for \--pipe.   Looks like will-cite is not among the options (I also checked the man page). The STDERR message is coming from this line of my docker preprocess.sh (which I copied from dm-preprocess-png)   find $IMAGES_DIRECTORY/ -name "*.dcm" | parallel \--will-cite "convert {} -resize 500x500! $PREPROCESS_IMAGES_DIRECTORY/{/.}.png" # faster than mogrify   Do you think the will-cite not found is an error message? My job continued to run though.
I realized that having two FROM statements in my Dockerfile is causing the problem after talking with Bruce today. It just removes everything before the second FROM statement including the command that installs parallel. Finally I am able to submit a running preprocessing job. Thanks.
``` # docker run -it --rm ubuntu:16.04 /bin/bash # apt update ... # apt install -y parallel ... # parallel --version GNU parallel 20141022 Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014 Ole Tange and Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. GNU parallel comes with no warranty. Web site: http://www.gnu.org/software/parallel When using programs that use GNU Parallel to process data for publication please cite: O. Tange (2011): GNU Parallel - The Command-Line Power Tool, ;login: The USENIX Magazine, February 2011:42-47. Or you can get GNU Parallel without this requirement by paying 10000 EUR. ```
I tried   RUN apt install -y parallel   Although it did not give any build errors, I still obtained the following error   STDERR: /train.sh: line 20: parallel: command not found   I could not find any rpm for Ubuntu xenial 16.04 but I downloaded a tar ball from here: http://packages.ubuntu.com/xenial/parallel but received the same error. To be precise I used the following commands for this option:   RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/p/parallel/parallel_20141022+ds1.orig.tar.gz RUN tar xzvf parallel_20141022+ds1.orig.tar.gz RUN cd parallel* CMD ./configure CMD make CMD make install   If I don't use parallel and use xargs instead, then I get xargs not found error. I don't know how I can install xargs. I will appreciate any help. Thanks.
Try to install parallel using your package manager (`apt install -y parallel`), otherwise go to the website of GNU parallel, download the RPM for your distribution and install it using the commands that I'm using in my example.
I realized that I did not include the command for installing "parallel" into my Dockerfile however I also realized that the Dockerfile provided in the dm-preprocess-png is for Centos. I am using Ubuntu 16.04. Could you provide a proprocessing image similar to dm-proprocess-png for Ubuntu as well? The Centos commandline did not work for me.
I put the zip file for my docker folder to syn7446136. I first execute the script called run_build and then run_push to prepare the docker image. I combined preprocessing and training into a single script by copying the lines from dm-preprocess-png's preprocess.sh into my my train.sh. The error I received was   STDERR: /train.sh: line 24: parallel: command not found   where line 24 is   find $IMAGES_DIRECTORY/ -name "*.dcm" parallel --will-cite "convert {} -resize 500x500! $PREPROCESS_IMAGES_DIRECTORY/{/.}.png" # faster than mogrify   which is the 26th line in   https://github.com/tschaffter/dm-docker/blob/master/dm-preprocess-png/preprocess.sh
The command `parallel` is correctly installed in the Docker image `dm-preprocess-png` (see below). ``` [root@vm ~]# docker pull docker.synapse.org/syn4224222/dm-preprocess-png Using default tag: latest latest: Pulling from syn4224222/dm-preprocess-png Digest: sha256:4a0a19bfff265acfb7a182b6f7866627d7695b2095aeae04f1f52622c2bf57e3 Status: Image is up to date for docker.synapse.org/syn4224222/dm-preprocess-png:latest [root@vm ~]# docker run -it --rm docker.synapse.org/syn4224222/dm-preprocess-png /bin/bash [root@9b4b2a8ccb7e /]# parallel --version GNU parallel 20160622 Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Ole Tange and Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. GNU parallel comes with no warranty. Web site: http://www.gnu.org/software/parallel When using programs that use GNU Parallel to process data for publication please cite as described in 'parallel --citation'. [root@9b4b2a8ccb7e /]# ``` Can you please provide the steps to reproduce your error as well as the exact error message? Thanks!

Parallel command not found error in dm-preprocess-png page is loading…