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

**URL:** <https://discourse.slicer.org/t/how-can-i-use-slicer-python-functions-in-my-docker-python-programs/27075>\
**Category:** Support\
**Created:** [January 6, 2023, 6:02am UTC](https://discourse.slicer.org/t/how-can-i-use-slicer-python-functions-in-my-docker-python-programs/27075 "2023-01-06T06:02:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh\_Ds](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rajesh_ds/32/16526_2.png) [@Rajesh\_Ds](https://discourse.slicer.org/u/Rajesh_Ds)\
**Post date:** [January 6, 2023, 6:02am UTC](https://discourse.slicer.org/t/how-can-i-use-slicer-python-functions-in-my-docker-python-programs/27075/1 "2023-01-06T06:02:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rajesh\_Ds](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rajesh_ds/32/16526_2.png) [@Rajesh\_Ds](https://discourse.slicer.org/u/Rajesh_Ds)\
**Post date:** [January 6, 2023, 8:28am UTC](https://discourse.slicer.org/t/how-can-i-use-slicer-python-functions-in-my-docker-python-programs/27075/2 "2023-01-06T08:28:10Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![Rajesh\_Ds](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rajesh_ds/32/16526_2.png) [@Rajesh\_Ds](https://discourse.slicer.org/u/Rajesh_Ds)\
**Post date:** [January 6, 2023, 8:29am UTC](https://discourse.slicer.org/t/how-can-i-use-slicer-python-functions-in-my-docker-python-programs/27075/3 "2023-01-06T08:29:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 6, 2023, 3:01pm UTC](https://discourse.slicer.org/t/how-can-i-use-slicer-python-functions-in-my-docker-python-programs/27075/4 "2023-01-06T15:01:03Z")

</div>

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

> **[GitHub - pieper/SlicerDockers: docker config files for slicer](https://github.com/pieper/SlicerDockers#running-a-slicer-analysis-script-in-an-instance)**
>
> docker config files for slicer. Contribute to pieper/SlicerDockers development by creating an account on GitHub.
