VTK Trame Docker Setup

Hi,

I’m trying out VTK trame docker image. I have done basic docker setup on CentOS-7. I’m also able to run a basic trame application on the host OS. I tried running the trame docker image but getting error ERROR: The deploy directory must be mounted into the container at /deploy. I followed this link and tried creating the application architecture using CookieCutter. I created basic project and able to build and run that application. But while I’m running the build_server.sh script referring the Readme, I’m getting following error. Can anyone point out if I have missed anything.

usermod: UID '0' already exists
groupmod: GID '0' already exists
mkdir: cannot create directory '/deploy/server': Permission denied
mkdir: cannot create directory '/deploy/server': Permission denied
mkdir: cannot create directory '/deploy/server': Permission denied
 * Restarting Apache httpd web server apache2                                                                                    [fail] 
 * The apache2 configtest failed.
Output of config test was:
AH00112: Warning: DocumentRoot [/deploy/server/www] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
(2)No such file or directory: AH02291: Cannot access directory '/deploy/server/logs/apache/' for error log of vhost defined at /etc/apache2/sites-enabled/001-trame.conf:1
AH00014: Configuration check failed
Action 'configtest' failed.
The Apache error log may have more information.
Error: [Errno 13] Permission denied: '/deploy/server'
/opt/trame/create_venv.sh: line 2: /deploy/server/venv/bin/activate: No such file or directory
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /usr/local/lib/python3.9/dist-packages (22.1.1)
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 10.6 MB/s eta 0:00:00
Installing collected packages: pip
  WARNING: The scripts pip, pip3, pip3.10 and pip3.9 are installed in '/home/trame-user/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.1.2
WARNING: There was an error checking the latest version of pip.
Defaulting to user installation because normal site-packages is not writeable
Processing /local-app
  Preparing metadata (setup.py) ... done
Collecting trame
  Downloading trame-2.0.1-py3-none-any.whl (17 kB)
Collecting trame-markdown
  Downloading trame_markdown-2.0.2-py3-none-any.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 8.5 MB/s eta 0:00:00
Collecting trame-client
  Downloading trame_client-2.0.2-py3-none-any.whl (208 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 208.9/208.9 kB 12.5 MB/s eta 0:00:00
Collecting trame-server
  Downloading trame_server-2.0.2-py3-none-any.whl (18 kB)
Collecting trame-deckgl
  Downloading trame_deckgl-2.0.1-py3-none-any.whl (708 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 708.9/708.9 kB 10.6 MB/s eta 0:00:00
Collecting trame-matplotlib
  Downloading trame_matplotlib-2.0.1-py3-none-any.whl (110 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 110.8/110.8 kB 242.8 MB/s eta 0:00:00
Collecting trame-components
  Downloading trame_components-2.0.1-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 9.0 MB/s eta 0:00:00
Collecting trame-vtk
  Downloading trame_vtk-2.0.3-py3-none-any.whl (523 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 523.8/523.8 kB 10.0 MB/s eta 0:00:00
Collecting trame-router
  Downloading trame_router-2.0.1-py3-none-any.whl (30 kB)
Collecting trame-plotly
  Downloading trame_plotly-2.0.1-py3-none-any.whl (12.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.1/12.1 MB 8.4 MB/s eta 0:00:00
Collecting trame-vuetify
  Downloading trame_vuetify-2.0.1-py3-none-any.whl (2.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 8.6 MB/s eta 0:00:00
Collecting trame-vega
  Downloading trame_vega-2.0.2-py3-none-any.whl (339 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 339.4/339.4 kB 10.2 MB/s eta 0:00:00
Collecting wslink>=1.6.4
  Downloading wslink-1.6.4-py3-none-any.whl (22 kB)
Collecting aiohttp
  Downloading aiohttp-3.8.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 9.2 MB/s eta 0:00:00
Collecting multidict<7.0,>=4.5
  Downloading multidict-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.2/114.2 kB 191.2 MB/s eta 0:00:00
Collecting yarl<2.0,>=1.0
  Downloading yarl-1.7.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (304 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 304.5/304.5 kB 12.7 MB/s eta 0:00:00
Collecting async-timeout<5.0,>=4.0.0a3
  Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting charset-normalizer<3.0,>=2.0
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting aiosignal>=1.1.2
  Downloading aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting frozenlist>=1.1.1
  Downloading frozenlist-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (156 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 156.2/156.2 kB 194.9 MB/s eta 0:00:00
Collecting attrs>=17.3.0
  Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.6/60.6 kB 261.0 MB/s eta 0:00:00
Collecting idna>=2.0
  Downloading idna-3.3-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 220.2 MB/s eta 0:00:00
Building wheels for collected packages: volume-viewer
  Building wheel for volume-viewer (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      error: could not create 'build': Permission denied
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for volume-viewer
  Running setup.py clean for volume-viewer
Failed to build volume-viewer
Installing collected packages: trame-client, trame-vuetify, trame-vtk, trame-vega, trame-router, trame-plotly, trame-matplotlib, trame-markdown, trame-deckgl, trame-components, multidict, idna, frozenlist, charset-normalizer, attrs, async-timeout, yarl, aiosignal, aiohttp, wslink, trame-server, trame, volume-viewer
  WARNING: The script normalizer is installed in '/home/trame-user/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for volume-viewer ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for volume-viewer did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      running install
      /usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      error: could not create 'build': Permission denied
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> volume-viewer

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Defaulting to user installation because normal site-packages is not writeable
Traceback (most recent call last):
  File "/opt/trame/generate_launcher_config.py", line 78, in <module>
    run(input_path, apps_path, out_path)
  File "/opt/trame/generate_launcher_config.py", line 63, in run
    with open(out_path, 'w') as wf:
FileNotFoundError: [Errno 2] No such file or directory: '/deploy/server/launcher.json'
 - Error: Skipping module client
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/trame-user/.local/lib/python3.9/site-packages/trame/tools/www.py", line 71, in <module>
    main()
  File "/home/trame-user/.local/lib/python3.9/site-packages/trame/tools/www.py", line 64, in main
    generator.enable_modules(*module_names)
  File "/home/trame-user/.local/lib/python3.9/site-packages/trame/tools/www.py", line 33, in enable_modules
    if "serve" in module.__dict__:
AttributeError: 'NoneType' object has no attribute '__dict__'
Build complete. Exiting.

It seems that docker is not allowed to write and create file in your server directory.
This lead the system unable to install your application when creating a virtual-env.

This is most likely related to CentOS security and docker management.

It also seems that you are running that command as root? If that is the case, you should do it as a non privileged user.

1 Like

Thanks @Sebastien_Jourdain. I’m able to build and even run the image using non-root user.

I created the basic application using CookieCutter. I created Simple ConeViewer example which I’m able to see on host machine after installing it on that. However, while running the container image I’m trying to view it on browser of host machine with URL
[Preformatted text](http://localhost:8080/volume_viewer.html) but page is not loading. Also, I’m getting following warning while running the run_server or run_mage script.

* Restarting Apache httpd web server apache2                                   AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
                                                                         [ OK ]
Starting the wslink launcher at
======== Running on http://0.0.0.0:9000 ========
(Press CTRL+C to quit)

For server name warning I tried this but it’s still same.

The message should not be an issue, but I’m not also necessarily following what is working and not.

How do you run docker? Does the index.html work but not volume_viewer.html?
What is your apps.yaml config? Are all the network call/response having the expected content?

I used run_image.sh script to run the docker image. I also tried run_server.sh. Before running these I had executed build_server.sh and build_image.sh. Neither index.html nor volume_viewer.html is working. I tried accessing using localhost as well the IP mentioned in the warning message for both files. The apps.yaml file content is given below.

PyWebVue: # Default app under /index.html
  app: volume_viewer
volume_viewer: # /volume_viewer.html
  app: volume_viewer

The curl command gives below output.

curl http://localhost:8080/volume_viewer.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.41 (Ubuntu) Server at localhost Port 8080</address>
</body></html>

Unable to understand this part mentioned by you :thinking:.

Update–

I was checking it and found that my local www folder was empty :zipper_mouth_face:. I had an error initially and I ran build_server.sh again. It didn’t shown any error so I thought it got built. Now I removed build and server directories and rebuilt the application. I’m getting error for the first time I’m running the build_server.sh and www directory is not getting populated. He is the error:

Using legacy 'setup.py install' for volume-viewer, since package 'wheel' is not installed.
Installing collected packages: trame-client, trame-vuetify, trame-vtk, trame-vega, trame-router, trame-plotly, trame-matplotlib, trame-markdown, trame-deckgl, trame-components, multidict, idna, frozenlist, charset-normalizer, attrs, async-timeout, yarl, aiosignal, aiohttp, wslink, trame-server, trame, volume-viewer
  Running setup.py install for volume-viewer ... done
Successfully installed aiohttp-3.8.1 aiosignal-1.2.0 async-timeout-4.0.2 attrs-21.4.0 charset-normalizer-2.0.12 frozenlist-1.3.0 idna-3.3 multidict-6.0.2 trame-2.0.1 trame-client-2.0.2 trame-components-2.0.1 trame-deckgl-2.0.1 trame-markdown-2.0.2 trame-matplotlib-2.0.1 trame-plotly-2.0.1 trame-router-2.0.1 trame-server-2.0.2 trame-vega-2.0.2 trame-vtk-2.0.5 trame-vuetify-2.0.1 volume-viewer-1.0.0 wslink-1.6.5 yarl-1.7.2
 - Error: Skipping module client
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/deploy/server/venv/lib/python3.9/site-packages/trame/tools/www.py", line 71, in <module>
    main()
  File "/deploy/server/venv/lib/python3.9/site-packages/trame/tools/www.py", line 64, in main
    generator.enable_modules(*module_names)
  File "/deploy/server/venv/lib/python3.9/site-packages/trame/tools/www.py", line 33, in enable_modules
    if "serve" in module.__dict__:
AttributeError: 'NoneType' object has no attribute '__dict__'
Build complete. Exiting.

Here’s my project structure:

I get it now, your code is based on trame-v1 and the image that is gestting pulled is for trame v2.

You need to pick a specific version of the image which should be one of the following.

1 Like

I now recreated the demo application using CookieCutter for Trame version 2. I followed same steps again. Removed old docker image and ran build_server.sh and it populated all the directories this time. However, while running the application it’s now showing loading image and then shows session timeout error. Moved a step ahead but now stuck on next step.

There’s no error is while I’m running script run_server.sh.

 * Restarting Apache httpd web server apache2                                                                                           AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
                                                                                                                                 [ OK ]
Starting the wslink launcher at
======== Running on http://0.0.0.0:9000 ========
(Press CTRL+C to quit)

One thing that I noticed in console logs of the browser is that it’s checking for http://localhost:8080/paraview/ URL. Unable to link current application with ParaView. Do I need to setup ParaVIEW on host ?

I also checked server log directory.
The error.log file is empty.
The access.log file content is

172.17.0.1 - - [06/Jun/2022:08:45:23 +0000] "GET /index.html HTTP/1.1" 200 1505 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:45:23 +0000] "GET /js/app.e824b0b6.js HTTP/1.1" 200 6435 "http://localhost:8080/index.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:45:23 +0000] "GET /js/chunk-vendors.b1171b04.js HTTP/1.1" 200 69138 "http://localhost:8080/index.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:45:23 +0000] "GET /js/app.e824b0b6.js.map HTTP/1.1" 404 490 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:45:23 +0000] "GET /js/chunk-vendors.b1171b04.js.map HTTP/1.1" 404 490 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:45:23 +0000] "POST /paraview/ HTTP/1.1" 503 303 "http://localhost:8080/index.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:49:20 +0000] "GET /volume-viewer.html HTTP/1.1" 200 1511 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:49:20 +0000] "GET /css/app.6e67310f.css HTTP/1.1" 200 829 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:49:20 +0000] "GET /js/app.e824b0b6.js HTTP/1.1" 200 6435 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:49:20 +0000] "GET /js/chunk-vendors.b1171b04.js HTTP/1.1" 200 69138 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:49:20 +0000] "GET /js/app.e824b0b6.js.map HTTP/1.1" 404 490 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:08:49:20 +0000] "GET /js/chunk-vendors.b1171b04.js.map HTTP/1.1" 404 490 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

The launcherLog.log file content is

2022-06-06 08:45:18,267:DEBUG:asyncio:Using selector: EpollSelector
2022-06-06 08:45:48,570:INFO:aiohttp.access:127.0.0.1 [06/Jun/2022:08:45:23 +0000] "POST /paraview/ HTTP/1.1" 503 252 "http://localhost:8080/index.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
2022-06-06 08:49:45,878:INFO:aiohttp.access:127.0.0.1 [06/Jun/2022:08:49:20 +0000] "POST /paraview/ HTTP/1.1" 503 252 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

The session specific log file content is

INFO:volume_viewer.app.engine:>>> ENGINE(a): Slider updating resolution to 6
INFO:volume_viewer.app.engine:>>> ENGINE(b): Slider updating resolution to 6
INFO:volume_viewer.app.engine:>>> ENGINE(b): Server is ready {'trame__scripts': ['__trame_vuetify/trame-vuetify.umd.min.js', '__volume_viewer/vue-volume_viewer.umd.min.js', '__trame_vtk/trame-vtk.js'], 'trame__styles': ['__trame_vuetify/trame-vuetify.css', '__volume_viewer/vue-volume_viewer.css'], 'trame__vue_use': ['trame_vuetify', 'volume_viewer', 'vue_vtk'], 'trame__mousetrap': [], 'trame__client_only': ['trame__busy'], 'trame__busy': 1, 'trame__favicon': None, 'trame__title': 'volume-viewer', 'resolution': 6, 'trame__template_main': '<v-app id="app">\n<v-app-bar app>\n<v-app-bar-nav-icon  />\n<v-toolbar-title >\nTrame / vtk.js\n</v-toolbar-title>\n<v-spacer  />\n<your-custom-widget attribute-name="Hello" js_attr_name="World" @click="trigger(\'trigger__2\')" @change="trigger(\'trigger__3\')" />\n<v-spacer  />\n<v-slider v-model="resolution" dense hide-details max="60" min="3" />\n<v-btn icon @click="trigger(\'trigger__4\')">\n<v-icon >\nmdi-crop-free\n</v-icon>\n</v-btn>\n<v-btn icon @click="trigger(\'trigger__5\')">\n<v-icon >\nmdi-undo\n</v-icon>\n</v-btn>\n</v-app-bar>\n<v-main >\n<v-container class="pa-0 fill-height" fluid>\n<vtk-view ref="view">\n<vtk-geometry-representation >\n<vtk-algorithm :state="{ resolution }" />\n</vtk-geometry-representation>\n</vtk-view>\n</v-container>\n</v-main>\n<v-footer class="my-0 py-0" app>\n<v-progress-circular class="ml-n3 mr-1" color="#04a94d" :indeterminate="trame__busy" size="16" width="3" />\n<a href="https://kitware.github.io/trame/" class="grey--text lighten-1--text text-caption text-decoration-none" target="_blank">Powered by trame</a>\n<v-spacer  />\n<v-btn class="mx-2" icon x-small @click="trigger(\'trigger__1\')">\n<v-icon x-small>\nmdi-autorenew\n</v-icon>\n</v-btn>\n<v-tooltip top>\n<template v-slot:activator="{on, attrs}">\n<v-icon v-bind="attrs" v-on="on" class="mr-4" x-small>\nmdi-help-circle\n</v-icon>\n</template>\n<pre >\ntrame == 2.1.0\nvuetify == 2.0.1\nvtk == 2.0.5\nvega == 2.0.2\nserver == 2.1.0\nrouter == 2.0.1\nplotly == 2.0.1\nmatplotlib == 2.0.1\nmarkdown == 2.0.2\ndeckgl == 2.0.1\ncomponents == 2.0.1\nclient == 2.1.0\n</pre>\n</v-tooltip>\n<a href="https://www.kitware.com/" class="grey--text lighten-1--text text-caption text-decoration-none" target="_blank">© 2021 Kitware Inc.</a>\n</v-footer>\n</v-app>'}

App running at:
 - Local:   http://0.0.0.0:9500/
 - Network: http://172.17.0.2:9500/

Note that for multi-users you need to use and configure a launcher.

I’ll try it on my end to be sure, but that error just means that the launcher thinks that your app is not yet ready to receive a connection before its timeout. While the log say otherwise. So that mean, the ready line part it not correct or something inside ./server/launcher.json.

BTW, you do not need paraview. The /paraview endpoint is really meant to be the launcher one. We kept that name for historic / backward compatible reason. I think eventually we will replace it with /launcher.

1 Like

okay thanks for clarification.

I found the issue. Thanks for reporting it. So the deal was that when I changed the launcher to detect "App running at" instead of "Starting factory", I did not double check that the trame connection information output was getting force flushed. I just fixed it in trame-server==2.1.1.

So if you delete your bundles/docker/server directory and rerun the build_server.sh script that should work.

1 Like

Thanks for quick response. I updated trame-server version to 2.1.1 and executed build_server.sh. Howerver, not it’s continuously stuck on loading screen. There’s some error that can be seen in browser console.

The content of access.log is

172.17.0.1 - - [06/Jun/2022:15:06:47 +0000] "GET /volume-viewer.html HTTP/1.1" 200 1511 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:47 +0000] "GET /css/app.6e67310f.css HTTP/1.1" 200 829 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:47 +0000] "GET /js/app.e824b0b6.js HTTP/1.1" 200 6435 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:47 +0000] "GET /js/chunk-vendors.b1171b04.js HTTP/1.1" 200 69138 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:47 +0000] "POST /paraview/ HTTP/1.1" 200 413 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:48 +0000] "GET /__volume_viewer/vue-volume_viewer.css HTTP/1.1" 404 489 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:48 +0000] "GET /__trame_vuetify/trame-vuetify.css HTTP/1.1" 200 115676 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"
172.17.0.1 - - [06/Jun/2022:15:06:48 +0000] "GET /js/app.e824b0b6.js.map HTTP/1.1" 404 490 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

The content of session log file is

INFO:volume_viewer.app.engine:>>> ENGINE(a): Slider updating resolution to 6
INFO:volume_viewer.app.engine:>>> ENGINE(b): Slider updating resolution to 6
INFO:volume_viewer.app.engine:>>> ENGINE(b): Server is ready {'trame__scripts': ['__trame_vuetify/trame-vuetify.umd.min.js', '__volume_viewer/vue-volume_viewer.umd.min.js', '__trame_vtk/trame-vtk.js'], 'trame__styles': ['__trame_vuetify/trame-vuetify.css', '__volume_viewer/vue-volume_viewer.css'], 'trame__vue_use': ['trame_vuetify', 'volume_viewer', 'vue_vtk'], 'trame__mousetrap': [], 'trame__client_only': ['trame__busy'], 'trame__busy': 1, 'trame__favicon': None, 'trame__title': 'volume-viewer', 'resolution': 6, 'trame__template_main': '<v-app id="app">\n<v-app-bar app>\n<v-app-bar-nav-icon  />\n<v-toolbar-title >\nTrame / vtk.js\n</v-toolbar-title>\n<v-spacer  />\n<your-custom-widget attribute-name="Hello" js_attr_name="World" @click="trigger(\'trigger__2\')" @change="trigger(\'trigger__3\')" />\n<v-spacer  />\n<v-slider v-model="resolution" dense hide-details max="60" min="3" />\n<v-btn icon @click="trigger(\'trigger__4\')">\n<v-icon >\nmdi-crop-free\n</v-icon>\n</v-btn>\n<v-btn icon @click="trigger(\'trigger__5\')">\n<v-icon >\nmdi-undo\n</v-icon>\n</v-btn>\n</v-app-bar>\n<v-main >\n<v-container class="pa-0 fill-height" fluid>\n<vtk-view ref="view">\n<vtk-geometry-representation >\n<vtk-algorithm :state="{ resolution }" />\n</vtk-geometry-representation>\n</vtk-view>\n</v-container>\n</v-main>\n<v-footer class="my-0 py-0" app>\n<v-progress-circular class="ml-n3 mr-1" color="#04a94d" :indeterminate="trame__busy" size="16" width="3" />\n<a href="https://kitware.github.io/trame/" class="grey--text lighten-1--text text-caption text-decoration-none" target="_blank">Powered by trame</a>\n<v-spacer  />\n<v-btn class="mx-2" icon x-small @click="trigger(\'trigger__1\')">\n<v-icon x-small>\nmdi-autorenew\n</v-icon>\n</v-btn>\n<v-tooltip top>\n<template v-slot:activator="{on, attrs}">\n<v-icon v-bind="attrs" v-on="on" class="mr-4" x-small>\nmdi-help-circle\n</v-icon>\n</template>\n<pre >\ntrame == 2.1.0\nvuetify == 2.0.1\nvtk == 2.0.5\nvega == 2.0.2\nserver == 2.1.1\nrouter == 2.0.1\nplotly == 2.0.1\nmatplotlib == 2.0.1\nmarkdown == 2.0.2\ndeckgl == 2.0.1\ncomponents == 2.0.1\nclient == 2.1.0\n</pre>\n</v-tooltip>\n<a href="https://www.kitware.com/" class="grey--text lighten-1--text text-caption text-decoration-none" target="_blank">© 2021 Kitware Inc.</a>\n</v-footer>\n</v-app>'}

App running at:
 - Local:   http://0.0.0.0:9500/
 - Network: http://172.17.0.2:9500/

Note that for multi-users you need to use and configure a launcher.

The content of launcherLog.log file is

2022-06-06 15:06:31,559:DEBUG:asyncio:Using selector: EpollSelector
2022-06-06 15:06:48,741:INFO:aiohttp.access:127.0.0.1 [06/Jun/2022:15:06:47 +0000] "POST /paraview/ HTTP/1.1" 200 326 "http://localhost:8080/volume-viewer.html" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

Where did you update the trame-server? This should happen automatically if you delete and rebuild the server directory.

The thing I noticed with your setup is that you try to serve some css while your code don’t have any. Inside your module/__init__.py just remove or comment the line for the style = [...]

While building it did downloaded latest version of trame-server. Just to be sure I also updated same in local python virtual environment used for CookieCutter project creation. The current project is the default one created by CookieCutter. I’m trying to run that only. Will be making changes once able to run it successfully.

Tried your suggestion and rebuild the project.

Still it’s stuck on loading page. However, the error looks different this time. The log files shows similar entries as before.

Did you build the custom components? The default setting of the cookiecutter does not have any JS. It seems that you have chosen the one with custom widgets which aim to show how you can integrate your own JS code into trame. And if you look at the README of the generated project, it should mention that you have to build the web part first.

To summarize, the cookie cutter should work out of the box. But depending on which template you base your project on, you may need to build your custom client library before your local application can be installable/usable.

Also before trying the docker, you need to make sure it works first.

So far it was not clear if the problem was within the docker/launcher or just the app itself.

Yes while generating the template I did chose App with Components. I followed the README and built the vue-components directory first, it built successfully. I also installed that application, ran it on host machine and able to view Cone in the browser. Next I built the server directory using the available scripts in bundles/docker/scripts.

Regarding the issue with app or docker do you have any suggestions that I could try out.

I guess you found another template issue with App + Components. The issue is that the ./server/www directory is missing your custom widgets that are only defined within your app.
To enable them, you need to add a www_modules entry to one of your exposed app.

My full apps.yaml content is below for reference. Just make sure you add the 2 missing lines and rebuild the server directory.

trame: 
  www_modules:            # MISSING
    - trame_app.module    # MISSING
  app: trame-app
trame-app:
  app: trame-app

Or you can also patch your ./server/www directory by running the following set of commands assuming your local venv for your app is active.

cd ./bundles/docker/server/www
python -m trame.tools.www trame_app.module

This should allow apache from docker to serve all the pieces that your trame app require.

Hopefully this should solve the remaining issue for you.

In the mean time, I’ll try to fix the cookie-cutter to have those missing lines in the setup/apps.yaml.

1 Like

Thanks @Sebastien_Jourdain. I tried the first way and it worked :clap:.

I’m able to see the cone application from the browser on host machine. However, while I’m accessing it from another machine using host machine IP address getting following error. I allowed 8080 port in firewall of host.

Do I need to make host setting in run scripts or any other setting to access it from other machine.

Connecting from a different machine should not matter. Here the server is telling you that the process failed when it ran the command line presented. The log file may tell you the issue.

So you may have to provide more context on what you’ve done that is working locally and not working remotely. Without those I can only make wild guess.

I just made the suggested changes and executed run script. Opened the host browser and able to access it. Tried same from other network machine but getting error.

Here is content of access.log looks normal. The session specific log file and error.log file are empty. The launcherLog.log file have some error

2022-06-07 14:47:25,173:DEBUG:asyncio:Using selector: EpollSelector
2022-06-07 14:48:41,789:ERROR:root:The command line failed
2022-06-07 14:48:41,790:ERROR:root:volume_viewer --host 0.0.0.0 --port 9500 --authKey 5PF7C6TKjhsAMw6A --server
2022-06-07 14:48:41,790:INFO:aiohttp.access:127.0.0.1 [07/Jun/2022:14:48:41 +0000] "POST /paraview/ HTTP/1.1" 503 325 "http://192.168.60.177:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"