Hello! I’m running it with this example: trame/examples/deploy/docker/SingleFile at master · Kitware/trame · GitHub There was an error, I’m a newbie, can you tell me more about it?
If you don’t explain what you are doing we can not help you.
When doing the following, it works for me
git clone https://github.com/Kitware/trame.git
cd trame/examples/deploy/docker/SingleFile
docker build -t trame-app .
docker run -it --rm -p 8080:80 trame-app
Open the application at http://localhost:8080/
When I follow your instructions, the following problem appears, the same as the one I encountered earlier:
Did the build step worked? Normally the ./setup/requirements.txt
should take care of the error.
Are you sure you are doing all the steps mentioned before without editing any file/directory?
Without more information on your system and on what you are doing or not, it will be hard to help more. Also paste text rather than picture… For example we see the output, but not the full input of what you did…
fatal: destination path "trame" already exists and is not empty directory.
- Running things as root is a bad idea.
The root user is probably the main issue as the non privilege user won’t have access to the venv.
I deployed TRARE to docker and implemented multi-user, but I encountered the following problems when deploying the application:When I deploy my remote rendering case to docker
The answer will be in the log files of the started session which can be found inside /deploy/server/logs/launcher/
of the docker image.
Please, try to provide more information in general as it is very hard to guess what you are doing…
- docker base image
- your app dependencies
- launcher configuration
- if VTK/ParaView is used
- Are you doing remote rendering?
- Are you using OSMesa or EGL?
- session log output
Hello! I use the steps you provided earlier “git clone GitHub - Kitware/trame: Trame lets you weave various components and technologies into a Web Application solely written in Python.
cd trame/examples/deploy/docker/SingleFile
docker build -t trame-app .
docker run -it --rm -p 8080:80 trame-app”, I successfully ran the case. I wrote a remote rendering case myself and wrote it directly to the folder I got by following the above operation, and I did not change the other files in it. Then the image is built, and after the build, I run the image directly and have a problem. Here is my file structure, and the result of running it.
I took the code fetched from GitHub and 06_vtk the remote rendering example, 02_ContourGeometry deployed it to docker, and then I looked at its logs and got the following issues.
Traceback (most recent call last):
File "/deploy/app.py", line 12, in <module>
from vtk import vtkXMLImageDataReader
ModuleNotFoundError: No module named 'vtk'
2023-04-13 13:21:49,195:ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/deploy/server/venv/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/deploy/server/venv/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/deploy/server/venv/lib/python3.9/site-packages/wslink/backends/aiohttp/launcher.py", line 95, in handle_post
return await self._waitForReady(session, request)
File "/deploy/server/venv/lib/python3.9/site-packages/wslink/backends/aiohttp/launcher.py", line 107, in _waitForReady
if self.process_manager.isReady(session, count):
File "/deploy/server/venv/lib/python3.9/site-packages/wslink/launcher.py", line 478, in isReady
if not self.isRunning(id) and count < 60:
File "/deploy/server/venv/lib/python3.9/site-packages/wslink/launcher.py", line 466, in isRunning
return self.processes[id].poll() is None
So the current issue you are having is that you did not list vtk as a dependency of your application in the ./setup/requirements.txt
file. Without VTK, your application can not run.
The next issue you will run into will be related to rendering inside docker. The default vtk library expect a GPU with X to be installed which is not true within Docker. You have 2 options. Either use the nvidia-runtime for your docker and use kitware/trame:glvnd base image with an EGL build of VTK. Or more simply use the osmesa of VTK as dependency.
I’ve created a docker example using vtk with rendering here.
The first method you mentioned is “use the osmesa of VTK”, I directly changed the content of the requirements .txt to “–extra-index-url https://wheels.vtk.org
trame
vtk-osmesa”, but the following error occurred
For the second method " use kitware/trame:glvnd base image with an EGL build of VTK. I added the phrase “FROM kitware/trame:glvnd” to the Dockerfile, which had the following problems when running:
The first (and second) error is related to your code where the VTK reader is failing loading your file.
When docker is used, you will need to mount your data from your host to the running docker image.
I have configured remote rendering through docker, how to configure GPU acceleration on the server
Use EGL build of VTK and use nvidia-runtime for your docker.
Can you go into more detail, are there any relevant cases?