Describe the bug
The option is listed in the README as
-o [OPT [OPT ...]], --container_option [OPT [OPT ...]]
parameters and flags to pass through to Docker or Singularity
This flag can take multiple arguments so cannot be
the final argument before the command argument (i.e.,
run or any other command that does not start with - or --)
defined here
|
parser.add_argument( |
|
'-o', '--container_option', |
|
dest='container_option', |
|
action='append', |
|
help='parameters and flags to pass through to Docker or Singularity\n' |
|
'\nThis flag can take multiple arguments so cannot ' |
|
'be\nthe final argument before the command argument (i.e.,\nrun ' |
|
'or any other command that does not start with - or --)\n', |
|
metavar='OPT' |
|
) |
but I don't see that parameter handled anywhere

Passing options through don't seem to work with any syntax I've attempted (see "To reproduce" below).
To reproduce
cpac -o --entrypoint=/bin/bash --platform docker run
cpac: error: argument -o/--container_option: expected one argument
cpac -o "--entrypoint=/bin/bash" --platform docker run
cpac: error: argument -o/--container_option: expected one argument
cpac -o="--entrypoint=/bin/bash" --platform docker run
cpac run: error: the following arguments are required: bids_dir, output_dir, level_of_analysis, extra_args
cpac -o="--entrypoint=/bin/bash" --platform docker run bids_dir outputs_dir participant
run.py: error: unrecognized arguments: -o=--entrypoint=/bin/bash
Expected behavior
Any options passed to -o or --container_option are passed through to Docker or Singularity.
Acceptance criteria
cpac version
0.3.2.post1
C-PAC version
v1.8.1, v1.8.1-dev
Container platform
Docker, Singularity
Describe the bug
The option is listed in the README as
defined here
cpac/src/cpac/__main__.py
Lines 74 to 83 in 46af66e
but I don't see that parameter handled anywhere

Passing options through don't seem to work with any syntax I've attempted (see "To reproduce" below).
To reproduce
cpac -o --entrypoint=/bin/bash --platform docker runcpac -o "--entrypoint=/bin/bash" --platform docker runcpac -o="--entrypoint=/bin/bash" --platform docker runcpac -o="--entrypoint=/bin/bash" --platform docker run bids_dir outputs_dir participantExpected behavior
Any options passed to
-oor--container_optionare passed through to Docker or Singularity.Acceptance criteria
cpac -o="--entrypoint=/bin/bash" --platform docker runopens a BASH prompt in a C-PAC Docker containercpac version
0.3.2.post1
C-PAC version
v1.8.1, v1.8.1-dev
Container platform
Docker, Singularity