Skip to content

Update to MADSci v0.8#5

Open
RyanTheRobothead wants to merge 6 commits into
mainfrom
v0.8
Open

Update to MADSci v0.8#5
RyanTheRobothead wants to merge 6 commits into
mainfrom
v0.8

Conversation

@RyanTheRobothead

Copy link
Copy Markdown
Member

Summary

Lifts the module from v0.6 to v0.8 for the RAPID 446 grimm rebuild.

  • pyproject.toml: pin madsci-*~=0.8.0; bump requires-python to >=3.10.
  • src/sciclops_rest_node.py: rename self.node_definition.{node_id,node_name}self.node_info.* at 4 sites (3× created_by= in _init_resource_templates() for gripper / lid_slot / plate_lid templates, 1× f"{...node_name}_gripper.nest" in _create_resources()).
  • Dockerfile rewritten on the v0.8 pattern:
    • Pin base to ghcr.io/ad-sdl/madsci:v0.8.0.
    • USER root before apt-get (v0.8 base image already drops to madsci for build steps; the libusb apt-install needs root).
    • uv pip install --python ${MADSCI_VENV}/bin/python -e ./sciclops_module so the editable install lands in the venv the runtime uses.
    • Bake in a dialout_fedora group at GID 18 alongside the container's built-in dialout (GID 20) so the same image works on Ubuntu (dialout=20) and Fedora (dialout=18).
    • Fix malformed CMD ["python", "-,", "sciclops_rest_node"]["python", "sciclops_module/src/sciclops_rest_node.py"].
  • README.md: documents the host udev rule required for raw USB access to Hudson vendor 0x7513. Without it, even a privileged container running as non-root madsci hits libusb USBError: [Errno 13] because /dev/bus/usb device nodes default to root:root 0664. The rule sets GROUP="dialout" — works on both Ubuntu and Fedora thanks to the dual dialout bake-in above.
  • testing/test_sciclops.ipynb: refreshed for the v0.8 driver.

Branched off the existing madsci_0.6 branch, so the diff against main includes the full v0.5 → v0.6 → v0.8 transition that lived on that branch.

Test plan

Verified end-to-end on grimm with sciclops_plankton:

  • curl /statusready: true
  • Container logs show Device Connected → CONNECTED SCICLOPS → STATUS 0000 0
  • ULID 01KN09Q3YKF7W143NWYCQM242M preserved via .madsci/registry.json
  • Verified host udev rule grants the in-container madsci user access to /dev/bus/usb/<bus>/<dev> for the Hudson device

caseystone and others added 6 commits March 30, 2026 17:22
Lifts the module from v0.6 to v0.8 for the RAPID 446 grimm rebuild.

- pyproject.toml: pin madsci-*~=0.8.0; bump requires-python to >=3.10.
- src/sciclops_rest_node.py: rename self.node_definition.{node_id,node_name}
  -> self.node_info.* at 4 sites (3x created_by= in
  _init_resource_templates() for gripper / lid_slot / plate_lid templates,
  1x f"{...node_name}_gripper.nest" in _create_resources()).
- Dockerfile: rewritten on the v0.8 pattern:
  - Pin base to ghcr.io/ad-sdl/madsci:v0.8.0.
  - `USER root` before apt-get (v0.8 base image already drops to madsci
    for build steps; the libusb dependency apt-install needs root).
  - `uv pip install --python ${MADSCI_VENV}/bin/python -e ./sciclops_module`
    so the editable install lands in the venv the runtime actually uses
    (system pip lands in /usr/lib site-packages, invisible to the
    venv interpreter).
  - Bake in a second `dialout_fedora` group at GID 18 alongside the
    container's built-in `dialout` (GID 20) so the same image works on
    Ubuntu (dialout=20) and Fedora (dialout=18) hosts.
  - Fix malformed CMD ["python", "-,", "sciclops_rest_node"] ->
    ["python", "sciclops_module/src/sciclops_rest_node.py"].
- README.md: documents the host udev rule required for raw USB access
  to Hudson vendor 0x7513. Without it, even a privileged container running
  as non-root madsci user hits libusb USBError: [Errno 13] because
  /dev/bus/usb device nodes default to root:root 0664. The rule sets
  GROUP="dialout" -- works on both Ubuntu and Fedora thanks to the
  dual dialout group bake-in above.
- testing/test_sciclops.ipynb: refreshed for the v0.8 driver.

Verified end-to-end on grimm with sciclops_plankton:
  /status -> ready: true
  logs    -> Device Connected -> CONNECTED SCICLOPS -> STATUS 0000 0
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

2 participants