Getting Started with Docker and ZED SDK

Open in ClaudeOpen in ChatGPT

Introduction

Docker lets you run code in a container: a virtualized environment where all of the code dependencies are already in place. Inside a container, your code is isolated from the rest of the host machine.

For the ZED SDK, with its specific OS and NVIDIA® CUDA requirements, Docker lets you use the SDK on an otherwise unsupported operating system and without installing its target CUDA version on the host — saving time and keeping your system “clean” from version conflicts. Isolation from the host also makes what you build far more portable, since the same container can be deployed to other devices in exactly the same way.

Examples of when this is useful:

  • You are working on a Linux distribution such as Debian or CentOS that is not supported by the SDK. Switching to Ubuntu may not be an option and would be time-consuming. Docker lets you run the ZED SDK inside its own Ubuntu environment on your non-Ubuntu device with little effort.
  • You are testing different versions of the ZED SDK at the same time, for example to check how the latest release improves performance over the one your application is built on. Docker lets you switch between them quickly without reinstalling the SDK, CUDA, and possibly the OS.
  • You need to build, test, and deploy an application using the ZED SDK in an isolated environment, to be sure it does not depend on anything in the host machine other than its stated dependencies. This is especially useful for CI/CD (Continuous Integration / Continuous Delivery). We do exactly this at StereoLabs to build all the versions of our SDK, among other tasks.

All of this comes with virtually no performance cost. The only real cost is the initial setup and configuration, which is covered in the following pages. We also provide ready-to-use containers on DockerHub and Dockerfiles on GitHub.

Where to start