Docker container for Xavier with CUDA

What is the best way of building a docker container for Xavier AGX with CUDA support ?
I have the latest Jetpack. I want the CUDA support because I will build upstream GStreamer with
nvenc/nvdec elements for video compression, and these elements require CUDA.

I have edited the docker daemon.json file to have

{
   "default-runtime": "nvidia",
   "runtimes": {
      "nvidia": {
         "path": "nvidia-container-runtime",
         "runtimeArgs": []
      }
   }
}

Hi @boxerab, since you are on JetPack 5, you can use the l4t-jetpack or l4t-cuda containers and start them with --runtime nvidia

Be aware that although Jetson supports video encode/decode hardware, it uses a different API for these than x86 and doesn’t support NVENC/NVDEC APIs:

So I’m not sure those nvenc/nvdec gstreamer elements would work. On Jetson there’s the nvv4l2*enc and nvv4l2decoder elements, and the L4T Multimedia API.

Thanks! I just want to encode h264 video, so I suppose that nvv4l2h264enc would do the trick. But are these upstream, or part of DeepStream ?

They come with L4T and you can get the sources from https://developer.nvidia.com/embedded/jetson-linux-r3541

Alas, it would not seem they are able to be built against newer versions of GStreamer: