Skip to content

Running without GPU #12

@andrey-blight

Description

@andrey-blight

I would like to use this docker on my vm. I don't have GPU, only CPU. Is it possible to use zendriver in docker without GPU on vm and not using --headless arg? I have tried this docker-compose.

services:
  app:
    build:
      context: .
      args:
        - ENABLE_XWAYLAND=false
        - SWAY_UNSUPPORTED_GPU=true
    ports:
      - 5910:5910
    volumes:
      - swayvnc-wayvnc-certs:/certs
    environment:
      - SWAY_RESOLUTION=1920x1080
      - WAYVNC_PORT=5910
      - WAYVNC_ENABLE_AUTH=true
      - WAYVNC_USERNAME=wayvnc
      - WAYVNC_PASSWORD=wayvnc

volumes:
  swayvnc-wayvnc-certs:

But got this error

app-1  | 00:00:00.003 [ERROR] [wlr] [render/wlr_renderer.c:249] drmGetDevices2 failed: No such file or directory
app-1  | Found WAYLAND_DISPLAY socket: /tmp/wayland-1
app-1  | Zendriver Docker demo (zendriver 0.6.1)
app-1  | Google Chrome 131.0.6778.85 x86_64 (Linux 6.8.0-60-generic)
app-1  | 
app-1  | Starting browser...
app-1  | Traceback (most recent call last):
app-1  |   File "<frozen runpy>", line 198, in _run_module_as_main
app-1  |   File "<frozen runpy>", line 88, in _run_code
app-1  |   File "/app/app/main.py", line 56, in <module>
app-1  |     asyncio.run(main())
app-1  |     ~~~~~~~~~~~^^^^^^^^
app-1  |   File "/home/chrome-user/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/asyncio/runners.py", line 195, in run
app-1  |     return runner.run(main)
app-1  |            ~~~~~~~~~~^^^^^^
app-1  |   File "/home/chrome-user/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/asyncio/runners.py", line 118, in run
app-1  |     return self._loop.run_until_complete(task)
app-1  |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
app-1  |   File "/home/chrome-user/.local/share/uv/python/cpython-3.13.5-linux-x86_64-gnu/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
app-1  |     return future.result()
app-1  |            ~~~~~~~~~~~~~^^
app-1  |   File "/app/app/main.py", line 32, in main
app-1  |     browser = await start_browser()
app-1  |               ^^^^^^^^^^^^^^^^^^^^^
app-1  |   File "/app/app/main.py", line 9, in start_browser
app-1  |     browser = await zd.start(
app-1  |               ^^^^^^^^^^^^^^^
app-1  |     ...<2 lines>...
app-1  |     )
app-1  |     ^
app-1  |   File "/app/.venv/lib/python3.13/site-packages/zendriver/core/util.py", line 96, in start
app-1  |     return await Browser.create(config)
app-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1  |   File "/app/.venv/lib/python3.13/site-packages/zendriver/core/browser.py", line 94, in create
app-1  |     await instance.start()
app-1  |   File "/app/.venv/lib/python3.13/site-packages/zendriver/core/browser.py", line 388, in start
app-1  |     raise Exception(
app-1  |     ...<9 lines>...
app-1  |     )
app-1  | Exception: 
app-1  |                 ---------------------
app-1  |                 Failed to connect to browser
app-1  |                 ---------------------
app-1  |                 One of the causes could be when you are running as root.
app-1  |                 In that case you need to pass no_sandbox=True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions