Skip to content

Mac: build trees in Docker volumes, a fixed Compose project name, Colima and M4 Pro RTF docs - #42

Merged
maxconwa merged 5 commits into
mainfrom
mac/build-volumes
Nov 21, 2026
Merged

maxconwa merged 5 commits into
mainfrom
mac/build-volumes

Conversation

@correll

@correll correll commented Nov 21, 2026

Copy link
Copy Markdown

For Max: findings from bringing the Mac stack up on a university-managed MacBook Pro (M4 Pro, Colima). Five small commits, one concern each.

What changed and why

  1. docker: fix the Compose project name to golem (affects every platform). Compose names a project after its directory, docker, so it adopted another checkout's stopped container (a hams_ros whose compose file also sat in a docker/ folder with a ros service), and docker_stack.sh's up --force-recreate deleted it to create golem_ros. A fixed name: golem limits the stack to its own containers. Nothing in the scripts or tests depended on the old project name.
  2. docker/mac: keep the colcon build trees in Docker volumes. On a managed Mac, endpoint security scans every file a container writes through the VM's file sharing. Writing 500 small files to the bind-mounted checkout took 89 s, against 0.02 s on the VM's own disk. A cold core_ws build ran over 40 min at ~15% CPU without finishing. core_ws/{build,install,log} and the sim's msgs_ws now live in named volumes (golem_core_*, golem_msgs_ws), and the sources stay bind-mounted. A cold build plus stack start now takes 2.5 min. Suggested as good practice, since most of our laptops are university-managed now.
  3. docs: the Mac's build volumes: MAC.md's image notes and the CLAUDE.md platform summary, including how to clear the volumes for a clean build.
  4. docs: Colima as a Mac Docker runtime: Colima works. Its share covers only ~, so the checkout must live there, and its default 30 GB disk is too small.
  5. docs: the Mac's real-time factor by sensor, on an M4 Pro: the G1 sim alone and with g1_mac_sim, with lidar and camera each on and off, plus the real sensor's 20k points. Every combination holds RTF 1.00 with the sim loop idle about half the time. Unpaced, the physics alone runs at 4-6× real time.

Testing

  • On the M4 Pro under Colima: docker_build.sh (all three arm64 images), then docker_stack.sh up robocasa --g1. The band released, HOMIE stood, and there was no fall or estop across 14 stack and sim runs.
  • Checked that the merged docker compose config mounts the volumes and that the base file's msgs_ws bind is replaced.
  • python3 -m unittest tests.docker.test_workflows tests.docker.test_launch_ros_cache on macOS: the same 16 failures before and after the change. They are environmental (no flock and other Linux tools), so they need a run on Linux.
  • Not run: x86/Linux, OrbStack or Docker Desktop, the H1-2, walking with Nav2 goals.

Existing checkouts: after this lands, the golem_* containers belong to project golem. Old ones made under project docker are still removed by name by the wrappers. Old core_ws/build, install and log folders in a Mac checkout are no longer used and can be deleted.

🤖 Generated with Claude Code

curobotlab and others added 5 commits November 20, 2026 18:26
Compose names a project after the compose file's directory, docker, so it
adopted another checkout's stopped containers whose compose file also sits in
a docker/ directory and has a ros service, and docker_stack.sh's
`up --force-recreate` deleted one of them to create golem_ros. A fixed
`name: golem` keeps the stack to its own containers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every file a container writes to the bind-mounted checkout reaches the macOS
host, and on a university-managed Mac its endpoint security scans each one:
under Colima on an M4 Pro a write took ~180 ms, against microseconds on the
VM's disk, and a cold core_ws build ran over 40 min at 15% CPU without
finishing. core_ws's build, install and log and the sim's msgs_ws now live
in named volumes on the VM's disk; the sources stay bind-mounted. A cold
build and stack start now takes 2.5 min.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MAC.md's image notes and CLAUDE.md's platform summary say the colcon build
trees are Docker volumes on the Mac, why (per-file scanning of writes to the
shared checkout on managed Macs) and how to clear them for a clean build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GOLEM's Mac stack builds and runs under Colima (vz VM): an M4 Pro held the
G1's g1_mac_sim at RTF 1.00. Colima shares only the home folder with its VM,
so the checkout must sit under ~, and its default 30 GB disk is too small
for the images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The G1 RoboCasa sim alone and with g1_mac_sim, paced at real time, with the
lidar and the head camera each on and off and the real MID-360's 20,000
points; and the sim alone unpaced over three runs each. Every combination
holds real time with the sim loop idle about half the time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@maxconwa maxconwa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Touches documentation, and docker-compose.mac.yaml. change to x86 docker-compose.yml only adds a name field.

Approved

@maxconwa
maxconwa merged commit b44a873 into main Nov 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants