How to apply vtkWeb in docker container

How can I implement my VTK script in a Docker container and connect it via vtkWeb with a client who wants to interact with the RenderWindow?
I’m using the image brainlife/pythonvtk (https://hub.docker.com/r/brainlife/pythonvtk ) and the example script for the RemoteRenderer (https://vtk.org/Wiki/VTK/Examples/Python/Web/RemoteRenderer ) so far

You should be able to use pvpython which comes with ParaView to run your VTK script but you may have to tweak the imports lines.

Anyhow if you do that, you can leverage our existing docker images for the ParaViewWeb applications.

You can do something similar to what we do here or here.

There is even some WIP that let you use a generic image (so you don’t need to build your own image) that let you expose your web app by just mounting a directory that follow a predefined pattern. @scottwittenburg should be able to point you in the right direction.

1 Like

Hi Thomas and Seb,

I hope to wrap that work up early next week, and will report back here when I can point to it.

Cheers,

Scott

1 Like

Hi Scott and Seb,

the approach with paraviewweb sounds interesting. Currently, I cannot build the Dockerfile of the Demo because of an unspecified path in Dockerfile (COPY config/website ), but that’ll work soon I guess.
It would be great to get your report, when you’ll have wrapped up your work, Scott – thanks!

Cheers,
Thomas

Hi Thomas,

All our Dockerfiles within the paraviewweb repository assume you’re sitting in the directory where the Dockerfile lives, I wonder if that’s causing the issue you mentioned with the unspecified path when copying the website into the container?

Otherwise, the approach @Sebastien Jourdain mentioned where you use the PVW base image (and don’t need to build your own image on top of that) should be ready soon.

Hope this helps,

Scott

Hi Scott,

I’ve been in the directory where the Dockerfile is located. However I got this error message. I’ll retry it in the following days and if it doesn’t work I’ll write down how to reproduce the error.
Thanks for the hints!

Cheers,
Raven