DeepStream SDK FAQ

32.[DSx_dGPU_App] How to use display window in the docker on Dgpu
Precondition:
1.Make sure that a monitor is connected to your host
2.Make sure that the driver version on the host is consistent with the version required by DeepStream. You can refer to the dGPU model Platform and OS Compatibility to get the matching version information.

Steps:
The below requirements shall be met before starting the docker:
1.Set appropriate value for the DISPLAY variable, you can use the “xdpyinfo | grep display” command on the host to get the id of the display
2.Execute the command: xhost + from the host terminal to allow the docker to launch a display window

Ex:
$ export DISPLAY=:0
$ xhost +

Note:

If you have multiple cards on your host, make sure to set NVIDIA’s card as the default one to use. There are two ways to configure the graphics card.

1.cli command:
$sudo apt install nvidia-settings
$sudo apt install nvidia-prime
$sudo prime-select nvidia

2.You can refer to the link switch-intel-nvidia-graphics-card-ubuntu to switch the card. Please choose the NVIDIA (Performance Mode) as show in the following image.