pyradiomics
pyradiomics copied to clipboard
docker: Self describing image
I suggest that we update the docker images with metadata allowing to know which CLIs are bundled with it.
An idea would be to add:
ENTRYPOINT ["python", "./cli_list.py"]
and bundle a cli_list.json and a cli_list.py
The cli_list.json has a simple syntax:
{
"batchprocessing": {
"type": "python"
},
"helloRadiomics": {
"type": "python"
},
}
Then, running the container using:
docker -ti run radiomics/pyradiomics --help
will list all display the json file.
And running:
docker -ti run radiomics/pyradiomics batchprocessing --param1 "value1" ...
will allow to execute batchprocessing cli.
docker -ti run radiomics/pyradiomics batchprocessing --xml
will output the CLI XML.
The CLi can be in c++ using "SlicerExecutionModel" or in python using ctk_cli
More details here: https://github.com/girder/slicer_cli_web
With that we can have a recipe to easily create pyradiomics CLI that can be described themself in a standard a way.
For example, this web UI is generated based on the CLI XML retrieved from a docker container:

LGTM
The
cli_list.jsonhas a simple syntax
JC, where is this syntax formalized?
Then, running the container using:
docker -ti run radiomics/pyradiomics --helpwill list all display the json file.
Is there an example that implements similar functionality using python+ctk_cli? I recall I asked a question related to this in https://github.com/Slicer/Slicer/pull/497, but it looks like that integration never happened.
I would like to see working examples before doing this for pyradiomics.