Skip to content

Outlook/best practices for custom packages #225

Open
@pbeaucage

Description

@pbeaucage

I have a use case for Opentrons robots that's a little outside the mainstream, where I have a custom server that runs on the robot that provides ad hoc, atomic command support outside of the idea of a protocol run where state variables like tips remaining are managed on the robot. (essentially, the robot is making mixtures on the fly based on characterization of prior samples). My codebase goes back into ancient Opentrons history, at least back to software 3.0, and I realize that at this point the HTTP API would probably be the recommended way to do this, though my understanding is that HTTP also has some underlying trouble with this kind of non-protocol running.

The problem I run into is that every software update brings a new set of packages on the robot side, so every version upgrade I contemplate, I wind up having to engineer varying levels of unstable hacks to get my code to run. By way of example, on 4.7.0, I have to modify distribution Python packages to assert Py3.7 compatibility and extract binaries for some compiled Python packages from universal wheels which are not supported on pip that old, on 7.2.0 I need to compile my own PyYAML on another armv7l box with handbuilt Py3.10 and transport the binary onto the robot, need to compile my own copy of git or use a pure-Python reimplementation of it since that was silently removed, etc, etc. There are features I don't run on the robot not because of compute power but because scipy is just too difficult to install.

As this project has grown we have a growing fleet of 7 OT-2 robots at 4 sites around the US running this codebase and the effort required to push these hacks is becoming unsustainable. I'm curious if there is an official solution contemplated or coming that would allow user-partition installs of these kinds of relatively basic, but compiled, packages. If not, I'm curious if someone would be able to offer thoughts on generating a fork of Opentrons buildroot where I could just repartition the SD card to expand the root partition, then install large swaths of Python and other compiled packages that would address almost all anticipated needs. It seems like buildroot provides a lot of desired packages, but the root partition size on OT-2 prevents shipping them with the robot, which is a choice I understand.

Obviously I would need to turn off firmware update signing on the robots that would receive this custom firmware, and would be responsible for syncing my buildroot fork with this one when updates come, but it seems more sustainable than having a manual repository of binary blobs and a hacked-together setup script for every Opentrons update. Before going further down this road, I figured it would be prudent to check in with experts and see if this sounds like a reasonable path. Maybe such a "developer" firmware with a large package base that required a complete SD card reflash that expanded the root partition could even be officially distributed if OT envisions running complex code on the robots as a viable path forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions