Open rgov opened 2 years ago
Thanks for detailing out these issues. PRs that improve support for any of these corners would be appreciated. I don't have a macOS machine to develop or test on, but am happy to consider any improvements in cross platform support that doesn't regress the main functionality.
I spent a while trying to get VirtualGL to work unsuccessfully but perhaps that is the right way?
Rocker 0.2.7 is not compatible with macOS. If you came here to report a problem, consider it unnecessary.
The current issues I've identified on macOS Monterrey are:
ERROR: test_pulse_extension (test_extension.PulseExtensionTest)
The proximate cause of the error is that macOS doesn't have an
audio
group. Even if this were the case, though, the volume mapping etc. would not work. It is possible to achieve forwarding of audio from a container to the host but it would require significant changes to the extension.FAIL: test_git_extension (test_git_extension.GitExtensionTest)
The test is flawed in that it assumes that
will result in a path like
/home/user/.gitconfig
but on macOS it resolves to/Users/user/.gitconfig
. This can easily be resolved.FAIL: test_x11_xpdyinfo (test_nvidia.X11Test)
You cannot mount the Unix sockets under
/tmp/.X11-unix
into the container because Docker for Mac doesn't support sharing Unix sockets. (Providing the volume mount seems harmless nonetheless.) Instead we need to send the environment variableDISPLAY=host.docker.internal:0
to the container and have it connect over the network. (Details on configuring XQuartz or Xauthority omitted here.)FAIL: test_nvidia_glmark2 (test_nvidia.NvidiaTest)
Nvidia GPUs are no longer supported on macOS, however in theory you should be able to point Docker's backend to a remote Linux server that does have a GPU, so a simple platform check isn't sufficient here.
OpenGL support in XQuartz
I added a snippet for the X11 extension that installs the OpenGL SW renderer to the container image:
Then enabled OpenGL drawing in XQuartz with
defaults write org.xquartz.X11 enable_iglx -bool true
per this answer. This gets us further, butrviz2
for example generates: