How can I use slicer python functions in my docker python programs?

I am trying to implement some medical image segmentation and visualization python programs on an aws instance. Later i want to build a docker image too. Just wanted to know what are the steps to be followed to make this happen on my aws linux instance. Could anyone help me with this.

I was trying to execute a python program with slicer functions, using the following command line

cmd = [“xvfb-run”,“-a”,“Slicer”,“–testing”, “–no-splash”,“–launcher-verbose”, “–python-script”, os.p$

process = subprocess.Popen(cmd)

and it throwed an error log as follows:

error: Application does NOT exists [/usr/bin/bin/SlicerApp-real]

Version of slicer is Slicer-4.13.0-2021-09-02-linux-amd64

This example shows how to run slicer python in a docker instance: