> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# How to Install ZED SDK with Docker on Linux

## Setting Up Docker

Install [Docker](https://docs.docker.com/engine/install/) on your host machine.

```bash
# Automatic setup script
curl -sSL https://get.docker.com/ | sh

# Run a test container to make sure the installation worked
sudo docker run hello-world
```

If Docker is correctly installed, you should get a message like this:

```bash
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/
```

> **Note**
>
> To run `docker` commands without `sudo`, create a Unix group called `docker` and add your user to it. Note that the `docker` group grants privileges equivalent to the root user. For more information, see the [Docker post-installation](https://docs.docker.com/engine/install/linux-postinstall/) guide.

### NVIDIA® Docker

> **Note**
>
> On *NVIDIA® Jetson™ boards*, skip the step below and go directly to the [Docker install guide for NVIDIA® Jetson™](/docs/integrations/docker/install-on-nvidia-jetson).

Install the [NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit) using the commands below. It lets you build and run GPU-accelerated Docker containers.

> **Note**
>
> Make sure you have [installed the NVIDIA® driver](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#pre-installation-actions) for your graphics card before installing `nvidia-container-toolkit`.

**`APT`**

```bash APT
# Add the package repository and its GPG key
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
    sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
# Register the NVIDIA runtime with Docker (required for --runtime nvidia)
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl daemon-reload
sudo systemctl restart docker
```

**`YUM`**

```bash YUM
# Add the package repository
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

sudo yum install -y nvidia-container-toolkit
# Register the NVIDIA runtime with Docker (required for --runtime nvidia)
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl daemon-reload
sudo systemctl restart docker
```

For the most up-to-date instructions, refer to the official [NVIDIA Container Toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

## Download a ZED SDK Docker Image

To build and run an application with the ZED SDK, you first need to pull a ZED SDK Docker image. The official ZED SDK Docker images are hosted in the [StereoLabs DockerHub](https://hub.docker.com/r/stereolabs/zed/) repository. Releases are [tagged](https://hub.docker.com/r/stereolabs/zed/tags/) by ZED SDK, CUDA, and Ubuntu version, with optional support for OpenGL.

The tag format for desktop images is `stereolabs/zed:<sdk>-<variant>-cuda<cuda>-ubuntu<ubuntu>`, where `<variant>` is one of:

* `runtime`: the ZED SDK runtime libraries, for production images.
* `devel`: the runtime plus the development headers and tools, to build your own applications.
* `gl-devel`: the `devel` image with OpenGL support, required to run graphical tools such as ZED Explorer.

For example, the following commands download a few ZED SDK 5.5 images to your machine:

```bash
docker pull stereolabs/zed:5.5-devel-cuda13.0-ubuntu22.04      # Ubuntu 22.04 development image, ZED SDK 5.5, CUDA 13.0
docker pull stereolabs/zed:5.5-runtime-cuda13.0-ubuntu22.04    # Ubuntu 22.04 runtime image, ZED SDK 5.5, CUDA 13.0
docker pull stereolabs/zed:5.5-runtime-cuda13.0-ubuntu24.04    # Ubuntu 24.04 runtime image, ZED SDK 5.5, CUDA 13.0
```

> **Note**
>
> Browse the [available tags](https://hub.docker.com/r/stereolabs/zed/tags/) to find the exact combination of ZED SDK, CUDA, and Ubuntu version that fits your needs. ZED SDK 5.5 desktop images are available for CUDA 13.0 on Ubuntu 22.04 and 24.04, CUDA 13.3 on Ubuntu 26.04, and (`devel` only) CUDA 12.8 on Ubuntu 24.04. At the time of writing, the `gl-devel` variant is not yet published for ZED SDK 5.5: use the ZED SDK 5.4 `gl-devel` images (CUDA 12.8, Ubuntu 22.04 and 24.04) when you need OpenGL.

## Start a Docker Container

To start a container from a ZED SDK image, use the following command:

```bash
docker run --gpus all -it --privileged stereolabs/zed:<container_tag>
```

The `--gpus all` flag exposes all available GPUs to the container, and `--privileged` grants the container access to the camera connected over USB.

For example:

```bash
docker run --gpus all -it --privileged stereolabs/zed:5.5-runtime-cuda13.0-ubuntu22.04
```

Congratulations, the ZED SDK is now available inside your container!

## Test the Docker Container with ZED SDK Capabilities

To verify the installation, we are going to run the ZED Explorer tool. By default, a Docker container can only run command-line applications. To open a display window, we need a container with OpenGL support (a `gl-devel` image). The example below uses the ZED SDK 5.4 `gl-devel` image, since no 5.5 `gl-devel` image is published yet.

```bash
docker pull stereolabs/zed:5.4-gl-devel-cuda12.8-ubuntu22.04   # pull the ZED SDK 5.4 devel image with OpenGL support on Ubuntu 22.04
xhost +si:localuser:root  # allow containers to communicate with the X server
docker run -it --gpus all --privileged -e NVIDIA_DRIVER_CAPABILITIES=all -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix stereolabs/zed:5.4-gl-devel-cuda12.8-ubuntu22.04
```

* `--gpus all` exposes all available GPUs to the container.
* `-e NVIDIA_DRIVER_CAPABILITIES=all` enables the graphics capabilities required by OpenGL.
* `-v /tmp/.X11-unix:/tmp/.X11-unix` lets the container access the display.
* `-e DISPLAY` makes your `DISPLAY` environment variable available inside the container.

You can now run any OpenGL application in the container. Let's launch ZED Explorer:

```bash
/usr/local/zed/tools/ZED_Explorer
```

You should now see the ZED Explorer GUI running on your display from within a Docker container!

## Run a Sample Application

In this example, we will build and run the Depth Sensing sample available in the ZED SDK samples folder.

```bash
apt update && apt install cmake -y
cp -r /usr/local/zed/samples/depth\ sensing/depth\ sensing/ /tmp/depth-sensing
cd /tmp/depth-sensing/cpp ; mkdir build ; cd build
cmake .. && make
./ZED_Depth_Sensing
```

Once you are comfortable running the ZED SDK in Docker, head to [Creating a Docker Image for your ZED Application](/docs/integrations/docker/create-docker-images) to package your own application.