> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuronav.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker Deployment

> Deploy Neuronav SLAM SDK using Docker for consistent, reproducible environments

Deploy the SDK with Docker for the fastest, most consistent setup across all platforms.

## Quick Start

The repository includes ready-to-use scripts:

```bash theme={null}
# Clone repository
git clone https://github.com/neuronav-io/neuronav-slam-sdk.git
cd neuronav-slam-sdk

# Build Docker image
./docker_build.sh

# Run container with camera access
./docker_run.sh

# Inside container, test SLAM
python3 examples/minimal_slam.py
```

## What's Included

The Docker image automatically provides:

* ROS2 Humble
* RTAB-Map SLAM
* Intel RealSense drivers
* OAK-D Pro (DepthAI) drivers
* All Python dependencies

## Manual Docker Commands

If you prefer manual control over the provided scripts:

**Build the image:**

```bash theme={null}
docker build -t neuronav-slam .
```

**Run with camera access:**

```bash theme={null}
docker run -it --rm \
  --privileged \
  --network host \
  -v /dev:/dev \
  -v $(pwd):/workspace \
  neuronav-slam
```

**Run with visualization:**

```bash theme={null}
# Allow X11 connections
xhost +local:docker

# Run with display
docker run -it --rm \
  --privileged \
  --network host \
  -v /dev:/dev \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  neuronav-slam

# Restore X11 security
xhost -local:docker
```

## Docker Compose

For running SLAM as a service:

```yaml theme={null}
# docker-compose.yml
version: '3.8'

services:
  slam:
    build: .
    image: neuronav-slam:latest
    privileged: true
    network_mode: host
    volumes:
      - /dev:/dev
      - ./data:/data
    environment:
      - ROS_DOMAIN_ID=1
      - DISPLAY=${DISPLAY}
    command: python3 /workspace/examples/minimal_slam.py
    restart: unless-stopped
```

Run with:

```bash theme={null}
docker-compose up
```

## Common Use Cases

**Save maps to host:**

```bash theme={null}
docker run -it --rm \
  --privileged \
  -v /dev:/dev \
  -v $(pwd)/maps:/maps \
  neuronav-slam
```

**Development with live code updates:**

```bash theme={null}
docker run -it --rm \
  --privileged \
  -v /dev:/dev \
  -v $(pwd):/workspace \
  neuronav-slam bash

# Inside container
pip3 install -e /workspace  # Changes reflect immediately
```

## Troubleshooting

**Camera not accessible:**

```bash theme={null}
# Verify camera is connected
lsusb | grep -E "Intel|Luxonis"

# Ensure privileged mode
docker run --privileged -v /dev:/dev neuronav-slam
```

**Visualization not working:**

```bash theme={null}
# Allow X11 connections
xhost +local:docker

# Verify DISPLAY variable
echo $DISPLAY
```

**ROS2 topics not visible:**

```bash theme={null}
# Use host network mode
docker run --network host neuronav-slam
```

## Next Steps

<CardGroup cols={3}>
  <Card title="Quick Start" icon="play" href="/getting-started/quickstart">
    Run your first SLAM
  </Card>

  <Card title="Examples" icon="code" href="/examples/basic-slam">
    Code examples
  </Card>

  <Card title="Configuration" icon="sliders" href="/configuration/overview">
    Customize settings
  </Card>
</CardGroup>
