我正在尝试在 docker 容器中以 chrome headless(版本:Google Chrome 102.0.5005.61)模式使用 GPU。Bug get next 错误:在容器中执行 cmd:启动容器:
docker run --gpus all --name centos-chrome-gpu1 -it centos-chrome-gpu:v1 /bin/bash
在容器中执行 cmd 来检测 GPU:
chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
Run Code Online (Sandbox Code Playgroud)
出现错误:
[root@3298c3aaf37a data]# chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
[0529/064825.243304:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0529/064825.244022:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect …Run Code Online (Sandbox Code Playgroud)