selkies-project / docker-nvidia-egl-desktop

KDE Plasma Desktop container designed for Kubernetes, supporting OpenGL EGL and GLX, Vulkan, and Wine/Proton for NVIDIA GPUs through WebRTC and HTML5, providing an open-source remote cloud/HPC graphics or game streaming platform.
https://github.com/selkies-project/docker-nvidia-egl-desktop/pkgs/container/nvidia-egl-desktop
Mozilla Public License 2.0
227 stars 48 forks source link

Enhancement request - AArch64 support #23

Open brianlmerritt opened 1 year ago

brianlmerritt commented 1 year ago

Any plans to support Nvidia Jetson Orin or Xavier systems on AArch64?

Would be from Jetpack 5.x

ehfd commented 1 year ago

Possible. Just no hardware and time.

  1. Compiling GStreamer for AARCH64 (addons/gstreamer)
  2. Add nvv4l2h264enc/nvv4l2vp9enc and test
  3. Verify all the pipeline works Would be trivial for newbies.

https://docs.nvidia.com/jetson/archives/r35.2.1/DeveloperGuide/text/SD/Multimedia/AcceleratedGstreamer.html

Nicholas Dufresne (ndufresne) at #gstreamer IRC oftc.net should be experienced in this regard.

ehfd commented 1 year ago

The above list is for https://github.com/selkies-project/selkies-gstreamer: https://github.com/selkies-project/selkies-gstreamer/issues/50.

For the container itself, it needs to detect the architecture with TARGETPLATFORM (https://nielscautaerts.xyz/making-dockerfiles-architecture-independent.html) and do not install :i386 packages if so and install the ARM version of VirtualGL https://github.com/selkies-project/docker-nvidia-egl-desktop/blob/f79e995fba666c5431893c768d786d52621a89ab/Dockerfile#L194 instead of amd64. I also believe that aarch64-linux-gnu should be used in some paths instead of i386-linux-gnu or x86_64-linux-gnu with an if clause.

Everything I listed must be tested.

brianlmerritt commented 1 year ago

Am thinking if we make this architecture independent that will have a knock on effect on your tags. Maybe multiple tags for i386?

FROM ghcr.io/selkies-project/nvidia-egl-desktop:22.04

The above should still work with the assumption it is i386

FROM ghcr.io/selkies-project/nvidia-egl-desktop:i386-22.04 or FROM ghcr.io/selkies-project/nvidia-egl-desktop:amd64-22.04

And maybe for arm8 we add

FROM ghcr.io/selkies-project/nvidia-egl-desktop:aarch64-20.04

But in nvidia jetson land there are different Jetpack releases and getting cuda to work is much better if the underlying platform matches so things could end up looking like

FROM ghcr.io/selkies-project/nvidia-egl-desktop:aarch64-l4t-r35.1.0-20.04

or as the jetpack sets the Ubuntu release maybe

FROM ghcr.io/selkies-project/nvidia-egl-desktop:aarch64-l4t-r35.1.0

Any thoughts or preferences?

ehfd commented 1 year ago

I will make initial preparations to make aarch64 work trivially. I do need tests from actual aarch64 hardware and therefore your help by testing things.

brianlmerritt commented 1 year ago

Cool - I can test on latest 20:04 Jetpack and 18:04 Jetson Nano if useful. 22:04 Jetpack is not due for release until autumn

ehfd commented 1 year ago

I now have the hardware, at least for plain ARM64.

brianlmerritt commented 1 year ago

👍

ehfd commented 1 year ago

https://github.com/selkies-project/selkies-gstreamer/issues/50

This is not a small work... Expect some time.

ehfd commented 11 months ago

I am doing some initial cleanup so that the Dockerfile and the entrypoint scripts are not reliant on just the x86_64 architecture. However, this is just the start and there are a lot more hurdles remaining.

ehfd commented 6 months ago

Preparing...

Note to self: (VirtualGL 3.1.1 arm64)

-rw-r--r-- root/root      4739 2022-11-22 19:21 ./usr/share/doc/virtualgl-3.0.90/somerights20.png
-rwxr-xr-x root/root   2398936 2022-11-22 19:47 ./usr/lib/libvglfaker-nodl.so
-rwxr-xr-x root/root     10312 2022-11-22 19:46 ./usr/lib/libgefaker.so
-rwxr-xr-x root/root   2403128 2022-11-22 19:47 ./usr/lib/libvglfaker.so
-rwxr-xr-x root/root     14528 2022-11-22 19:46 ./usr/lib/libdlfaker.so
ehfd commented 6 months ago

I do not have a Jetson device. Thus, someone will need to provide an example that builds GStreamer 1.24.0 with NVIDIA Deepstream SDK V4L2 Video Encoder integrated.

Other than that, things are coming this way.

brianlmerritt commented 5 months ago

@ehfd I am travelling for a few weeks, but will have a go when I get back.

Do you care which Ubuntu distro / jetpack version?

ehfd commented 5 months ago

You should know better, so I won't comment. Perhaps look out for Ubuntu 24.04.

ehfd commented 3 months ago

Theoretically, I removed all dependencies specific to x86_64, but regular builds for Selkies-GStreamer on aarch64 are too prohibitive because there is a 6-hour limit in GitHub Actions and emulated aarch64 builds take (at least) 8 times longer than x86_64, which the builds will be cut off by the limit. Thus people will need to self-build, starting from Selkies-GStreamer.