Update to MADSci v0.8#5
Open
RyanTheRobothead wants to merge 6 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lifts the module from v0.6 to v0.8 for the RAPID 446 grimm rebuild.
pyproject.toml: pinmadsci-*~=0.8.0; bumprequires-pythonto>=3.10.src/sciclops_rest_node.py: renameself.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()).Dockerfilerewritten on the v0.8 pattern:ghcr.io/ad-sdl/madsci:v0.8.0.USER rootbeforeapt-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_moduleso the editable install lands in the venv the runtime uses.dialout_fedoragroup at GID 18 alongside the container's built-indialout(GID 20) so the same image works on Ubuntu (dialout=20) and Fedora (dialout=18).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 vendor0x7513. Without it, even a privileged container running as non-rootmadscihits libusbUSBError: [Errno 13]because/dev/bus/usbdevice nodes default toroot:root 0664. The rule setsGROUP="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.6branch, so the diff againstmainincludes 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 /status→ready: trueDevice Connected → CONNECTED SCICLOPS → STATUS 0000 001KN09Q3YKF7W143NWYCQM242Mpreserved via.madsci/registry.jsonmadsciuser access to/dev/bus/usb/<bus>/<dev>for the Hudson device