adamrehn / ue4-runtime

Container images for running packaged Unreal Engine projects via the NVIDIA Container Toolkit
https://hub.docker.com/r/adamrehn/ue4-runtime
MIT License
82 stars 26 forks source link

How to display the window #3

Closed oldraincoat closed 4 years ago

oldraincoat commented 4 years ago

Thanks for sharing the code. I'm running the docker container on a remote host and I want to display the window on my local machine. I use ssh to connect to the remote host and X11forwarding is enabled. I start a container with: docker run --runtime=nvidia -v /tmp/.X11-unix:/tmp/.X11-unix:rw -e DISPLAY adamrehn/ue4-runtime:18.04-cudagl10.0-virtualgl When I run the command ./UE4Editor or vglrun ./UE4Editor in the container, the GPUs start to run. But there is no windows for displaying. How cam I solve this? Thank you

adamrehn commented 4 years ago

The arguments -v /tmp/.X11-unix:/tmp/.X11-unix:rw -e DISPLAY bind-mount the X11 socket from the host system into the container and use the the host user's DISPLAY environment variable, which means the X Server on the remote host system will receive all of the windowing commands. To allow these to be forwarded to your local machine you'll need to make sure you've configured the VirtualGL server correctly on the remote host system as per the official documentation: https://cdn.rawgit.com/VirtualGL/virtualgl/2.5/doc/index.html#hd006