Hi @jeremias.tx finally I managed to run two containers and I am also able to run containers with GUI (the python-qt5 sample).
Then I move to a pure python GUI that I run with:
docker run \
-e ACCEPT_FSL_EULA=1 \
-e DISPLAY=wayland-0 \
-e WAYLAND_DISPLAY=wayland-0 \
-e XDG_RUNTIME_DIR=/tmp \
-d --rm --name=pythongui-app \
-p 8080:8080/tcp \
-v /dev/dri:/dev/dri \
-v /dev/galcore:/dev/galcore \
-v /tmp/wayland-0:/tmp/wayland-0 \
--device-cgroup-rule='c 199:* rmw' \
--device-cgroup-rule='c 226:* rmw' \
pythongui:latest
But unfortunately it seems that the “DISPLAY” variable is not resolved, I made many tests changing the DISPLAY values: adding the :0 or the :0, but nothing changes.
Here is the error:
[2023-08-11 09:23:03,143] ERROR in app: Exception on /1/print-files/radio/start [POST]
Traceback (most recent call last):
File "/home/torizon/.venv/lib/python3.11/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/torizon/.venv/lib/python3.11/site-packages/flask/app.py", line 1519, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/torizon/.venv/lib/python3.11/site-packages/flask/app.py", line 1517, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/torizon/.venv/lib/python3.11/site-packages/flask/app.py", line 1503, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/torizon/.venv/lib/python3.11/site-packages/asgiref/sync.py", line 218, in __call__
return call_result.result()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/torizon/.venv/lib/python3.11/site-packages/asgiref/sync.py", line 284, in main_wrap
result = await self.awaitable(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/torizon/.venv/lib/python3.11/site-packages/connexion/decorators/decorator.py", line 55, in wrapper
connexion_response = await connexion_response
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/torizon/server/controllers/default_controller.py", line 189, in start_print
display.run()
File "/home/torizon/server/backend/display.py", line 17, in run
self.root = Tk()
^^^^
File "/usr/lib/python3.11/tkinter/__init__.py", line 2326, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: couldn't connect to display "wayland-0"
Is this error related to Python code or it depends by a container configuration?
Best regards,
Stefano.