Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: Self describing image #240

Open
jcfr opened this issue Apr 12, 2017 · 2 comments
Open

docker: Self describing image #240

jcfr opened this issue Apr 12, 2017 · 2 comments

Comments

@jcfr
Copy link
Collaborator

jcfr commented Apr 12, 2017

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

@pieper
Copy link
Contributor

pieper commented Apr 12, 2017

LGTM

@fedorov
Copy link
Collaborator

fedorov commented Apr 12, 2017

The cli_list.json has a simple syntax

JC, where is this syntax formalized?

Then, running the container using: docker -ti run radiomics/pyradiomics --help will 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 Slicer/Slicer#497, but it looks like that integration never happened.

I would like to see working examples before doing this for pyradiomics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants