Clara Deploy Digital Pathology Image Processing Pipeline
How to Run a Reference Pipeline using Local Input Files
Download & Install the Pipeline from NGC
Please refer to Setup section to install this Pipeline.
Note down the pipeline ID during the pipeline installation as it would be used in a later section to trigger a job with input files.
Trigger Pipeline
A pipeline can be triggered via Clara CLI. To trigger this pipeline, you will need to have a image in a format that OpenSlide can read (e.g., .svs and .tif) and a configuration file for Render Server (config_render.json) that can be used as source input data.
For this created pipeline, sample input files are available in the zipped test data file.
Let's say that the path of the unzipped test data folder is TEST_DATA_FOLDER.
- Open a terminal and go to the pipeline directory which has pipeline definition file as well as test input/model folder.
cd /path-to-pipeline-folder/
- Trigger the pipeline (upload input files to Clara API Server) with the pipeline ID in the previous section.
clara create jobs -n dp-sample -p <pipeline ID> -f <TEST_DATA_FOLDER>/
When the above step is completed, you should be able to see the following result in the terminal (UUID of Job and Payload may be different).
JOB ID:f3170b457f5c41879951e6da8f37341e
PAYLOAD ID:12bb398cb54844d5958d51e66e10713a
Note down this job ID and payload ID as they would be used in a later section to access output files.
Then, start the job:
# Start a job (with parameters `VARIANCE`, `LOWER_THRESHOLD`, and `UPPER_THRESHOLD` if needed. e.g., '-a VARIANCE=10.0' )
clara start job -j <JOB ID>
Creating a pipeline/job and starting/monitoring a job can also be done by run_pipeline.sh script:
mkdir -p ~/.clara/pipelines
cd ~/.clara/pipelines
# Download pipeline
clara pull pipeline clara_dp_sample_pipeline
cd clara_dp_sample_pipeline
# Unzip test input data
unzip app_dp_sample-input_v1.zip -d input
# Run script
# ./run_pipeline.sh [method]
# [method] can be one of ['no-optimization', 'jpg'] (default: 'jpg')
#
./run_pipeline.sh jpg
Verify the Pipeline Execution in Management Console
- Go to the Clara Management Console using a web browser:
The URL is:
<IP of the machine>:32002 - Go to the
JOBSview. You should see a job with a name that includes the name of the job you specified (dp-sample) - You can inspect the status of each operator inside that job
Viewing the Output Volume Image
- Go to the Clara RenderServer UI using a web browser:
The URL is:
<IP of the machine>:8080 - You should see a dataset with a name that includes the name of the job you specified and the operator name (e.g.,
dp-sample-stitch-image) - Clicking the dataset would show the rendered image on the screen
- Zooming: mouse scroll.
- Panning: mouse middle button. On Mac: Hold the key 'a' while dragging the mouse (drag with the left button).
Download and Verify the Outputs
Once the job has completed successfully, we can download output payload by using clara download command.
Output payload files are located under /operators/<operator name defined in the pipeline definition>/ folder.
Since we triggered a pipeline whose volume output operator's name is stitch-image, we can use the following command to
download output files into result folder:
clara download <Job ID>:/operators/stitch-image/* result
Then, you can see the output files using the following command:
ls -al result
If you are working with the server machine, the payload folder is directly accessible at the default payload folder /clara/payloads/<Payload ID>/.