NICE DCV Ubuntu 24.04 Docker Container

0

I'm struggling to setup my docker container on my Ubuntu 24.04 host. The container itself runs ubuntu as well. Similarly to my original 20.04 https://repost.aws/questions/QUm2jjzH8YQSubxPBQeXwZqg/nice-dcv-docker-container-ubuntu) setup i tried to implement a version for the newest ubuntu, but i cant get the application to run using the gpu. The stream itself works and any rendering is done using CPU, but the gpu remains untouched.

The command

sudo DISPLAY=:0 XAUTHORITY=$(ps aux | grep "X.*\-auth" | grep -v Xdcv | grep -v grep | sed -n 's/.*-auth \([^ ]\+\).*/\1/p') xhost | grep "LOCAL:$"

results in:

Authorization required, but no authorization protocol specified

xhost:  unable to open display ":0"

dcvgldiag results in


ERROR (2/2)

  Cannot start a temporary 3D X Server on display :0

  Please, check the X logs for display 0.

My xorg.conf looks like that:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 550.144.03

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/mouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Option         "HardDPMS" "false"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA A10G"
    BusID          "PCI:0:30:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "ConnectedMonitor" "DFP-0,DFP-1,DFP-2,DFP-3"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


Running glxgears in the session results in:

E Jun 10 11:50:08:045949 2834:2834 DCVGL (char* findSystemGLXVendor()): Could not open a connection to :0.0
E Jun 10 11:50:08:045985 2834:2834 DCVGL (int __glx_Main(uint32_t, const __GLXapiExports*, __GLXvendorInfo*, __GLXapiImports*)): No supported glVND vendor found on local display

nvidia-smi works correctly, but it seems the x server is somehow not correctly setup and can't connect to the graphics card. Not sure how to proceed from here.

Thanks, Julian

asked 7 days ago25 views
2 Answers
0

Based on your description, it appears you're having issues with GPU acceleration in your Amazon DCV (formerly NICE DCV) Docker container on Ubuntu 24.04. The key issue seems to be that the X server in your container isn't properly connecting to the NVIDIA GPU.

Here are some suggestions to resolve this issue:

  1. X Server Configuration: Your error message "Cannot start a temporary 3D X Server on display :0" indicates that the X server isn't properly configured to use the GPU. Make sure the X server is running with the correct permissions and has access to the GPU devices.

  2. NVIDIA Container Toolkit: Ensure you have the NVIDIA Container Toolkit properly installed and configured. This is essential for GPU passthrough to Docker containers:

sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
  1. Docker Run Command: When running your Docker container, make sure to include all necessary flags for GPU access:
docker run -d --name dcv-container \
--gpus all \
--privileged \
--network=host \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=:0 \
-e NVIDIA_VISIBLE_DEVICES=all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
--device /dev/nvidia0:/dev/nvidia0 \
--device /dev/nvidiactl:/dev/nvidiactl \
--device /dev/nvidia-modeset:/dev/nvidia-modeset \
--device /dev/nvidia-uvm:/dev/nvidia-uvm \
your-dcv-image
  1. X Server in Container: Inside the container, you need to properly configure the X server to use the NVIDIA GPU:
nvidia-xconfig --preserve-busid --enable-all-gpus
systemctl isolate multi-user.target
systemctl isolate graphical.target
  1. Wayland Support: Note that Amazon DCV 2024.0 now natively supports Wayland on Ubuntu 24.04, which might provide better performance. Consider configuring your setup to use Wayland instead of X11 if possible.

  2. Console Session: For desktop acceleration, try using a console session instead of a virtual session. You can configure an automatic console session in /etc/dcv/dcv.conf:

[session-management]
create-session = true
[session-management/automatic-console-session]
owner="your-username"
  1. Check DCV Configuration: Ensure your DCV configuration has GPU acceleration enabled:
[display]
gpu_accel = true

After making these changes, restart the DCV server and try connecting again. If you're still experiencing issues, check the DCV server logs for more specific error messages.
Sources
NICE DCV renames to Amazon DCV and releases version 2024.0 with support for Ubuntu 24.04 - AWS
NICE DCV ON DOCKER STUCK ON LOADING SCREEN AFTER DCV AUTH SCREEN | AWS re:Post
GPU Instance (g4dn.xlarge) CUDA Driver Initialization Issue in Docker Container | AWS re:Post
NICE DCV Pixel issues on GPU | AWS re:Post

answered 7 days ago
0

Unfortunately the AI answer does not solve anything

i tried running gpu_burn, which works and nvidia-smi actually shows the current load as it should, so i think something is wrong with my setup in general (either some missing dependencies or some general setup stuff)

answered 7 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions