Skip to content

Add Docker-based macOS workflow and headless CLI#7

Open
aalksii wants to merge 2 commits intoDaekkyn:masterfrom
aalksii:main
Open

Add Docker-based macOS workflow and headless CLI#7
aalksii wants to merge 2 commits intoDaekkyn:masterfrom
aalksii:main

Conversation

@aalksii
Copy link
Copy Markdown

@aalksii aalksii commented Mar 26, 2026

Summary

This PR makes Brickr much easier to run on modern macOS systems, especially Apple Silicon, by adding a Docker-based workflow and a headless CLI path.

Changes included:

  • add a Docker-based setup for building and running Brickr on macOS
  • expose the GUI through a browser-based noVNC desktop instead of relying on local X11 setup
  • replace the bundled runtime binvox path with a Python voxelizer flow that works reliably in the container
  • fix BINVOX dimension handling so generated voxel files load correctly
  • improve file handling in the containerized/browser workflow
  • add a headless CLI mode for converting meshes, printing stats, and exporting outputs without opening the GUI

Why

The original project is older and difficult to run on a modern macOS machine, particularly on Apple Silicon. The bundled Linux binvox binary also fails in this environment, which blocks mesh import.

This PR provides a practical path to keep the project usable today:

  • Dockerized build/runtime
  • browser-accessible GUI
  • working mesh voxelization in-container
  • CLI usage for scripting and non-interactive workflows

CLI Example

docker run --rm \
  --platform=linux/amd64 \
  --entrypoint /opt/brickr/brickr \
  -e BINVOX_PATH=/opt/brickr/tools/obj_to_binvox.py \
  -e QT_QPA_PLATFORM=offscreen \
  -v "$PWD/output:/opt/brickr/output" \
  brickr:local \
  --cli \
  --input /opt/brickr/models/toyplane.obj \
  --resolution 30 \
  --print-stats \
  --export-obj /opt/brickr/output/toyplane.obj \
  --save-instructions /opt/brickr/output/toyplane.svg
Screenshot 2026-03-24 at 19 05 48 Screenshot 2026-03-24 at 19 18 49

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.

1 participant