# Docker container for Xavier with CUDA

**URL:** <https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485>\
**Category:** Jetson AGX Xavier\
**Tags:** docker\
**Created:** [September 5, 2023, 6:39pm UTC](https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485 "2023-09-05T18:39:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![boxerab](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/boxerab/32/76334_2.png) [@boxerab](https://forums.developer.nvidia.com/u/boxerab)\
**Post date:** [September 5, 2023, 6:39pm UTC](https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485/1 "2023-09-05T18:39:11Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![dusty\_nv](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dusty_nv/32/14043_2.png) [@dusty\_nv](https://forums.developer.nvidia.com/u/dusty_nv)\
**Post date:** [September 5, 2023, 6:47pm UTC](https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485/2 "2023-09-05T18:47:44Z")

</div>

Hi @boxerab, since you are on JetPack 5, you can use the [l4t-jetpack](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack) or [l4t-cuda](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/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:

> [@NVENC support to Jetson Nano](https://forums.developer.nvidia.com/t/nvenc-support-to-jetson-nano/167650):
>
> Hi, I came across NVENC which seems to give better quality video compared to other available tools. My question, does Jetson nano supports “NVENC”. If so, can you please provide an example to record the video? Thanks Karunakar

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.

---

<div class="post-metadata">

**Author:** ![boxerab](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/boxerab/32/76334_2.png) [@boxerab](https://forums.developer.nvidia.com/u/boxerab)\
**Post date:** [September 5, 2023, 6:50pm UTC](https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485/4 "2023-09-05T18:50:03Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![dusty\_nv](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dusty_nv/32/14043_2.png) [@dusty\_nv](https://forums.developer.nvidia.com/u/dusty_nv)\
**Post date:** [September 6, 2023, 2:28am UTC](https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485/5 "2023-09-06T02:28:13Z")

</div>

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

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

> [@How to upgrade gstreamer version to 1.20 without breaking deepstream on jetson devices](https://forums.developer.nvidia.com/t/how-to-upgrade-gstreamer-version-to-1-20-without-breaking-deepstream-on-jetson-devices/237629/9):
>
> hi, thanks for the upgrade steps. I want to know if it’s possible to support the HW accelerated plugins in gstreamer 1.18.6?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [September 27, 2023, 3:02am UTC](https://forums.developer.nvidia.com/t/docker-container-for-xavier-with-cuda/265485/7 "2023-09-27T03:02:44Z")

</div>

Closed on September 27, 2023, 3:02am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
