Skip to content

Commit b6322d2

Browse files
docs: add Docker section to the readme
1 parent 36fda8d commit b6322d2

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,32 @@ pip config --site set global.no-build-isolation false
2020
pip install -ve .
2121
```
2222

23+
## Docker (GUI + GPU + HW add-ons)
24+
25+
**Prereqs:** Docker + docker-compose, X11 on host, NVIDIA driver + NVIDIA Container Toolkit (legacy `runtime: nvidia`).
26+
**Layout:** `Docker/Dockerfile`, overrides in `compose/` (`base.yml`, `gui.yml`, `gpu.yml`, `hw.yml`).
27+
28+
### Build the image
29+
`docker-compose -f compose/base.yml build dev`
30+
31+
### (GUI) allow X access (host)
32+
`export XAUTHORITY=${XAUTHORITY:-$HOME/.Xauthority}`
33+
`xhost +si:localuser:root`
34+
35+
### Run container with GUI + GPU + HW and open a shell
36+
`docker-compose -f compose/base.yml -f compose/gui.yml -f compose/gpu.yml -f compose/hw.yml run --rm run bash`
37+
*(Use fewer `-f` files for lighter setups, e.g., GUI+GPU without HW.)*
38+
39+
### Inside the container
40+
`pip install -v -e extensions/rcs_fr3`
41+
`cd examples`
42+
`python fr3_env_cartesian_control.py`
43+
44+
### Troubleshooting
45+
- **`nvidia-smi` missing in container:** ensure it exists on host at `/usr/bin/nvidia-smi` (GPU override bind-mounts it).
46+
- **GUI can’t open:** re-run the `xhost` command and confirm `$DISPLAY` is set on the host.
47+
48+
2349
## Usage
2450
The python package is called `rcs`.
2551

0 commit comments

Comments
 (0)