Skip to content

docker: Self describing image #240

@jcfr

Description

@jcfr

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:

generated_cli_ui

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions