Context: I am trying to build a pipeline. This pipeline consist in 2 phases, the first one is running a tool called DeCoSTAR (it's an executable, a binary) on a bunch of input parameter files. The next part is running a python app over the output files of DeCoSTAR.
What I want is for this pipeline to be user-friendly and portable, so it should run on whatever OS the host user has.
In order to do so, I am trying to use Docker.
Now for the first phase, I created my own Dockerfile based on a python-alpine
image :
FROM python:2.7-alpine3.7
MAINTAINER *********
COPY ./DeCoSTAR /bin/DeCoSTAR
COPY ./DeCoSTAR.py ./DeCoSTAR.py
DeCoSTAR.py
is a way for me to launch the DeCoSTAR executable on a given
parameter file (which will be on the host computer). In order for the user to provide this input I use Tkinter :
#!/usr/bin/python2.7
#coding:utf8
from Tkinter import Tk
from tkFileDialog import askopenfilename
import subprocess
from subprocess import call
def main ():
print ("Input a parameter file:")
Tk().withdraw()
param_file=askopenfilename()
f= "/bin/DeCoSTAR parameter.file="+param_file
subprocess.call(f, shell=True)
if __name__=="__main__":
main()
Now the thing is :
I can't figure out how to run DeCoSTAR.py automatically When I run my image it runs on python2.7. I've tried
RUN DeCoSTAR.py
but it doesn't work.I use the
exec
command in Docker to try if would work either way. I've launchedpython DeCoSTAR.py
and got this :tkinter.TclError: no display name and no $DISPLAY environment variable
What I want is to display the open file window in the host computer so that the user can pick up and provide his own parameter file. I don't want it to display the container file, which is why I think it doesn't work.