Paraview web inside docker container

Hi,

I am trying to work on Paraview web inside docker container. For this, I dint use the default BASE_IMAGE=kitware/paraviewweb:pv-v5.6.0-egl, but instead I have my own image in which Paraview web required files are loaded.

  1. I have used same settings for apache2 and launcher file inside docker container as tested outside without docker.

  2. When I run start.sh and apache2 inside docker container, I get connection error in the link http://localhost/lite/?data=/dir , and the error and proxy files are empty.

  3. The ProxyPass in apache2 is set as ProxyPass /paraview http://localhost:8080/paraview.

How do I run the correctly in detached mode, so as to load paraview web correctly in the URL.

Regards,
Sunag R A.

Why don’t you use the standard pvw docker and configure the launcher to run your ParaView Lite rather than the one inside the bundled paraview? The image is designed to run any pvw app and therefore, your code should not differ in that regard.

Also you will need to provide error messages/logs so we could have an idea where the issue is coming from.

Since you are using the EGL version do you have all your nvidia runtime working as expected?

Hi,

  1. No, I am not using EGL version. I mentioned that to show that I am not using any version provided by kitware.

  2. The process of working in my docker container is this:

a. Dockerfile with all the installation along with apache2. Copy data directory which contains (pvw, proxy, pv, conf, logs etc). The pv version I am using is pv-5.9.0.
b. The configuration of apache2 and launcher file is done before building image.

Here is the apache2 configuration which contains the log path.

  <VirtualHost *:80>
      #ServerName   localhost
      ServerAdmin  sunag.ra@123.com
      DocumentRoot /home/data/www

      ErrorLog /home/data/logs/apache_error.log
      CustomLog /home/data/logs/apache_access.log combined

      <Directory /home/data/www/>
          Options Indexes FollowSymLinks
          Order allow,deny
          Allow from all
          AllowOverride None
          Require all granted
      </Directory>

      # Handle launcher forwarding
      ProxyPass /paraview http://localhost:9000/paraview

      # Handle WebSocket forwarding
      RewriteEngine On
      RewriteMap session-to-port txt:/home/data/proxy.txt
      RewriteCond %{QUERY_STRING} ^sessionId=(.*)&path=(.*)$ [NC]
      RewriteRule ^/proxy.*$  ws://${session-to-port:%1}/%2  [P]
    </VirtualHost>

Now,

I need to run the image with start.sh so that launcher will run and apache2 with port so that pvw will run. What should be the command line for docker run?

Does my need make understandable?

Regards,

Sunag R A.

Hi Sunag,

Is this what you are looking for?

We built those images to support many use cases, and therefore we’d like to know what we’ve forgotten. Can you explain your motivation for building your own?

Hi Drew,

Yes, this is something this I am trying to run from docker.

  1. I am trying to use single image where OpenFOAM simulations are run and the obtained vtk files are stored in the pvw directory. So, Dockerfile contains OpenFOAM related installation and all the config files for pvw.

  2. I am trying to understand how this command should be implemented (along with any changes to do for apache2 config) for the docker image so as to run pvw.

  3. Or, should I need to create separate Dockerfile and build all together separate image?

sudo docker run --gpus all                 \
    -p 0.0.0.0:9000:80                      \
    -v ~:/data                               \
    -e "SERVER_NAME=localhost:9000"           \
    -e "PROTOCOL=ws"                           \
    -ti kitware/paraviewweb:pvw-egl-demo-v5.6.0

Regards,
Sunag R A.

Hi Sunag,

I think the simplest path forward would be to use two images, docker’s storage support to transfer the files between them. One image would be your OpenFOAM simulation, specifying to keep the vtk files outside of docker after it runs. The other would be our provided paraview web image, which will have access to the vtk files with the -v volume in the docker run command

sudo docker run --gpus all                 \
    -p 0.0.0.0:9000:80                      \
    -v ~:/data                               \
    -e "SERVER_NAME=localhost:9000"           \
    -e "PROTOCOL=ws"                           \
    -ti kitware/paraviewweb:pvw-egl-demo-v5.6.0