Cannot trigger chest xray classification pipeline from example

Hi,
I tried to deploy a testing environment on my server. everything goes fine until i try to trigger the pipeline.
the job is complain about invalid container.
Job stuck forever at Trying to check TRTIS server health…

and the container error is ‘container ai-app-chestxray is not valid for pod xxx.xxx’
Any guide to help me figure out which part of the deployment went wrong?
Thanks
ZY

Which version of Clara are you running the pipeline on?

Hi poongzy4iagk,

Could you copy&paste the output of the following command?

clara version # to see current version
docker images | grep clara # to see which versions of clara images are installed
kubectl get all # to see currently executing pods/services

Hi,
The version I deployed is 0.4.1. I redeploy the package on fresh machine and it is working now.
I am trying to do a further steps that is not in the SDK.
You guys know how can i attach a DICOM pipeline to the existing example?
The inference seem only taking PNG.
Thanks
ZY

Hi poongzy4iagk,

Good to know that it is working now.

The reference pipeline only takes a PNG file for now.
And, if you want to take image from a DICOM file,
You can add a custom operator before ai-app-chestxray stage in chestxray-pipeline.yaml

For example,

  1. Create a custom operator with a docker.

Create main.py (below code is an example of such code) that process .dcm files from /input folder and save .png file into /output folder:

from shutil import copy
from pathlib import Path

if __name__ == '__main__':
    # Read a DCM file
    inp_path = next(Path('/input').glob('*.dcm'))
    # Process DCM file (extract images) and save into /output/ folder (Here, it just copy so wrong implementation)
    copy(inp_path, Path('/output', inp_path.with_suffix('.png').name))

Create Dockerfile

FROM python:3.7-slim

WORKDIR /workspace

COPY ./main.py ./main.py

ENTRYPOINT ["python", "-u", "main.py"]
  1. Build the container image locally:

docker build -t read-dicom .

  1. Edit chestxray-pipeline.yaml

chestxray-pipeline.yaml

 api-version: 0.3.0
 name: chestxray-pipeline
 operators:
+  - name: read-dicom
+    description: Read DICOM image and save into PNG file
+    container:
+      image: read-dicom
+      tag: latest
+    input:
+    - path: /input
+    output:
+    - path: /output
   - name: ai-app-chestxray
     description: Classifying Chest X-ray Images
     container:
       image: clara/ai-chestxray  # this can be different in your file.
       tag: latest                              # this can be different in your file.
     input:
-    - path: /input
+    - from: read-dicom
+      path: /input

To implement DICOM to PNG converter, you can refer to resources from the internet (you can use pydicom library to parse DICOM files and may need to use PIL/scikit-image to convert image array to PNG file):

Then, you can trigger the pipeline with the input folder having .dcm file (or you can trigger the pipeline through PACS server by configuring the PACS’ IP and AE Title : https://docs.nvidia.com/clara/deploy/RunningReferencePipeline.html#configure-the-clara-dicom-destination ).

1 Like