init
This commit is contained in:
14
.devcontainer/devcontainer.json
Normal file
14
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "zed-playground",
|
||||
"dockerComposeFile": "../docker-compose.yml",
|
||||
"service": "zed",
|
||||
"workspaceFolder": "/workspaces/zed-playground",
|
||||
"shutdownAction": "stopCompose",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "bash"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM stereolabs/zed:5.1-gl-devel-cuda12.8-ubuntu24.04
|
||||
|
||||
# Use USTC mirrors for faster access in China.
|
||||
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|https://mirrors.ustc.edu.cn/ubuntu/|g' /etc/apt/sources.list \
|
||||
&& sed -i 's|http://security.ubuntu.com/ubuntu/|https://mirrors.ustc.edu.cn/ubuntu/|g' /etc/apt/sources.list \
|
||||
&& mkdir -p /etc/pip \
|
||||
&& printf "%s\n" \
|
||||
"[global]" \
|
||||
"index-url = https://pypi.mirrors.ustc.edu.cn/simple" \
|
||||
"trusted-host = pypi.mirrors.ustc.edu.cn" \
|
||||
> /etc/pip.conf
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
45
README.md
Normal file
45
README.md
Normal file
@ -0,0 +1,45 @@
|
||||
# ZED Playground
|
||||
|
||||
This repo provides a Docker Compose setup and Dev Container config based on
|
||||
`stereolabs/zed:5.1-gl-devel-cuda12.8-ubuntu24.04`.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Docker + Docker Compose v2
|
||||
- NVIDIA Container Toolkit (GPU support)
|
||||
- ZED camera connected via USB (optional)
|
||||
|
||||
If you use GUI apps inside the container, you need X11 access from the host.
|
||||
|
||||
## Quick Start (Docker Compose)
|
||||
|
||||
1) Allow local X11 access for root:
|
||||
|
||||
```bash
|
||||
xhost +local:root
|
||||
```
|
||||
|
||||
2) Start the container:
|
||||
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
3) Open a shell in the running container:
|
||||
|
||||
```bash
|
||||
docker compose exec zed bash
|
||||
```
|
||||
|
||||
## Dev Container (VS Code / compatible)
|
||||
|
||||
1) Open this folder in a Dev Container-capable editor.
|
||||
2) It will use `.devcontainer/devcontainer.json` and `docker-compose.yml`.
|
||||
|
||||
## Notes
|
||||
|
||||
- If you are on Wayland, X11 forwarding may require XWayland. If GUI apps do
|
||||
not appear, log into an X11 session or enable XWayland.
|
||||
- USB devices are passed through via `/dev/bus/usb` and the container runs
|
||||
`privileged` for camera access.
|
||||
- The workspace is mounted at `/workspaces/zed-playground`.
|
||||
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
||||
services:
|
||||
zed:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
network: host
|
||||
container_name: zed-dev
|
||||
shm_size: "8gb"
|
||||
volumes:
|
||||
- .:/workspaces/zed-playground:cached
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
||||
working_dir: /workspaces/zed-playground
|
||||
environment:
|
||||
DISPLAY: "${DISPLAY}"
|
||||
NVIDIA_VISIBLE_DEVICES: "all"
|
||||
NVIDIA_DRIVER_CAPABILITIES: "compute,graphics,utility,video"
|
||||
HTTP_PROXY: "http://127.0.0.1:36000"
|
||||
HTTPS_PROXY: "http://127.0.0.1:36000"
|
||||
NO_PROXY: "localhost,127.0.0.1,::1,host.docker.internal"
|
||||
privileged: true
|
||||
devices:
|
||||
- /dev/bus/usb:/dev/bus/usb
|
||||
gpus: all
|
||||
network_mode: host
|
||||
stdin_open: true
|
||||
tty: true
|
||||
Reference in New Issue
Block a user