How to specify python file while running existing docker image

Hi ,

I want to save series of png files from paraview web visualizer application.
for that I have done changes in file as

Save actual screenshot

            # simple.SaveScreenshot(fullPath)
            # view = self.getView(viewId)
            resolution = v.ViewSize
            simple.SaveAnimation(filePath, view, ImageResolution=resolution) # FrameWindow=[0, 43]

Now i want to supply this file while running docker, so that it will create png for all my loaded data files.
i am using paraview 5.6.0 docker on ec2. Its an existing docker image, I just want to write all the loaded files into png format.

I am using below command to run existing docker “pvw-visualizer-osmesa-master”,

sudo docker run --rm -p -v /home/ubuntu/animation/data:/data -v /home/ubuntu/animation/Web/python/paraview/web/ -v /home/ubuntu/animation/pvw/launcher:/pvw/launcher -v /home/ubuntu/animation/pvw:/pvw -e “” -e “PROTOCOL=ws” -e “EXTRA_PVPYTHON_ARGS=-dr,–mesa-swr,Web/python/paraview/web/” -ti ws://

I am supplying the file as
-v /home/ubuntu/animation/Web/python/paraview/web/ but it is not picking up

also I am trying to supply it as args to EXTRA_PVPYTHON_ARGS
“visualizer”: {
“cmd”: [

But it does not work, My question here is, I want to modify one python file , Do i need to build whole new paraview build or new Docker ?
OR can i specify it as argument.

Please let me know.
Nitin Kadam.

Hi Nitin,

The pvpython program cannot take the path as an argument, so don’t follow that path any further. You might still be able to achieve your goal of swapping a different in an existing pre-built container, however. I think your best bet is to pick the pvw containers [1] (pick one that starts with pvw) which allow you to run what we refer to as a “fully external” web application, where you mount a directory containing your web application.

There are some docs [2] you should read on that, but the basic idea would be for you to take the pvw visualizer server python code and built javascript application (tarball available here[3]), and just patch the to import your edited (which should also live in the directory you mount). If you run into issues where your replacement can’t import other paraview web python modules, you may need to copy those into your mounted directory as well.

All this isn’t terribly difficult, but it’s probably not trivial either, especially if you’re not comfortable with the various pieces involved. So feel free to continue responding on this thread if you decide to try it out and run into issues.






Hi Scott,

Thanks for the suggestions. I worked on it and I did Visualiser javascript build using npm.
Now I am facing problem that where should I specify the new Visualiser.js file?

i am running below docker,
sudo docker run --rm -p -v /home/ubuntu/animation/data:/data -v /home/ubuntu/animation/pvw/launcher:/pvw/launcher -v /home/ubuntu/animation/pvw:/pvw -e “” -e “PROTOCOL=ws” -e “EXTRA_PVPYTHON_ARGS=-dr,–mesa-swr” -ti ws://

I tried to put it as visualiser.js in document root in apache server conf file but it is not working.

DocumentRoot /home/ubuntu/visualizer-build/visualizer/dist
(in dist my new Visualiser.js file is present)

Let me know where to specify this new javascript file for visualiser.

Nitin Kadam.