Hi, I'm building Docker images that contain XNAT commands, but when I pull the image into XNAT it hides the image because it cannot detect any commands.
I can add the command JSON manually and it works, but the embedded label is not being picked up. This is what I see in 'docker image inspect':
"Labels": {
"org.nrg.commands": "[{\"name\": \"ukat_t2star\", \"command-line\": \"python ukat_t2star.py /input /output [METHOD]\", \"image\": \"martincraig/ukat\", \"label\": \"ukat_t2star\", \"version\": \"0.0.1\", \"schema-version\": \"1.0\", \"info-url\": \"\", \"type\": \"docker\", \"description\": \"Runs UKAT T2* mapping\", \"inputs\": [{\"name\": \"method\", \"replacement-key\": \"[METHOD]\", \"required\": false, \"type\": \"string\", \"default-value\": \"loglin\", \"description\": \"Method for calculating T2* - loglin or 2p_exp\"}], \"outputs\": [{\"mount\": \"ukat-out\", \"required\": \"true\", \"name\": \"t2star\", \"description\": \"T2* map\"}], \"mounts\": [{\"writable\": \"false\", \"path\": \"/input\", \"name\": \"nifti-in\"}, {\"writable\": \"true\", \"path\": \"/output\", \"name\": \"ukat-out\"}], \"xnat\": [{\"derived-inputs\": [{\"name\": \"scan-niftis\", \"matcher\": \"@.label == 'NIFTI'\", \"provides-files-for-command-mount\": \"nifti-in\", \"derived-from-wrapper-input\": \"scan\", \"type\": \"Resource\", \"description\": \"The nifti resource on the scan\"}], \"contexts\": [\"xnat:imageScanData\"], \"description\": \"Run UKAT T2* mapping\", \"label\": \"ukat_t2star\", \"output-handlers\": [{\"accepts-command-output\": \"t2star\", \"label\": \"T2STAR\", \"type\": \"Resource\", \"name\": \"t2star-resource\", \"as-a-child-of-wrapper-input\": \"scan\"}], \"external-inputs\": [{\"matcher\": \"'NIFTI' in @.resources[*].label\", \"required\": true, \"type\": \"Scan\", \"name\": \"scan\", \"description\": \"Input scan\"}], \"name\": \"ukat_t2star-scan\"}]}, \t{\"name\": \"ukat_b0\", \"command-line\": \"python ukat_b0.py /input /output [METHOD]\", \"image\": \"martincraig/ukat\", \"label\": \"ukat_b0\", \"version\": \"0.0.1\", \"schema-version\": \"1.0\", \"info-url\": \"\", \"type\": \"docker\", \"description\": \"Runs UKAT B0 mapping\", \"inputs\": [], \"outputs\": [{\"mount\": \"ukat-out\", \"required\": \"true\", \"name\": \"b0\", \"description\": \"B0 maps\"}], \"mounts\": [{\"writable\": \"false\", \"path\": \"/input\", \"name\": \"nifti-in\"}, {\"writable\": \"true\", \"path\": \"/output\", \"name\": \"ukat-out\"}], \"xnat\": [{\"derived-inputs\": [{\"name\": \"scan-niftis\", \"matcher\": \"@.label == 'NIFTI'\", \"provides-files-for-command-mount\": \"nifti-in\", \"derived-from-wrapper-input\": \"scan\", \"type\": \"Resource\", \"description\": \"The nifti resource on the scan\"}], \"contexts\": [\"xnat:imageScanData\"], \"description\": \"Run UKAT B0 mapping\", \"label\": \"ukat_b0\", \"output-handlers\": [{\"accepts-command-output\": \"b0\", \"label\": \"B0\", \"type\": \"Resource\", \"name\": \"b0-resource\", \"as-a-child-of-wrapper-input\": \"scan\"}], \"external-inputs\": [{\"matcher\": \"'NIFTI' in @.resources[*].label\", \"required\": true, \"type\": \"Scan\", \"name\": \"scan\", \"description\": \"Input scan\"}], \"name\": \"ukat_b0-scan\"}]}]"
}
This is generated using cmd2label.py directly from the same json I have used successfully with the manual method.
Any ideas what might be going wrong here? I can't see anything in the XNAT logs.
Thanks for any help,
Martin