Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Support #9

Open
raindancer2204 opened this issue Jun 15, 2022 · 4 comments
Open

Docker Support #9

raindancer2204 opened this issue Jun 15, 2022 · 4 comments
Milestone

Comments

@raindancer2204
Copy link

hello project,

you really did a great project for the OWI USB robotic arm.

Would it be possible for you to also provide the whole thing in a Docker container image?

For Intel and ARM? thus several could work on the project.

Thank you

@dannystaple
Copy link
Member

Hello,
That could be an interesting idea. I know this works a treat on a Raspberry Pi. It would require investigating USB device forwarding into a container, which sounds plausible but Ive not yet researched it. I can't take this on right now - but it's an interesting enhancement suggestion.

@dannystaple
Copy link
Member

If someone was to create a related PR showing the container and readme info on how to work the USB forwarding - I would be happy to review this.

@raindancer2204
Copy link
Author

Hi,

it really simple to connect the USB to your Docker Container. I would prefer to do this with a docker compose.yaml.
Here you can find the needed informations about it.
https://www.homeautomationguy.io/docker-tips/accessing-usb-devices-from-docker-containers/

Here you can find the informations how to build a docker file:
https://stackify.com/docker-build-a-beginners-guide-to-building-docker-images/

It would be good if you do this in two ways for arm or on X86. Because for example most of NAS Home Systems Work on Intel.

If you have question contact me via PN.

Regards

@dannystaple
Copy link
Member

dannystaple commented Jun 17, 2022

Hello, I'm no stranger to docker (other than this USB pass through aspect). However, I cannot take on further enhancement projects right now. The example passthrough you quotes looks like it's passing through a USB UART device - this robot arm is not a USB UART, and is using native USB.

It might be achievable with a privileged container, but may also fail where the host does not have a driver. One problem this had was no signed host drivers for Windows 10 due to the age of the software that comes with the arm. If the intent is only to support Linux, this may be easier as I think Linux will show the device with LSUSB even if it's not got a driver. That would require some testing.

Encapsulating some python plus libraries in a Dockerfile, easy. Getting github workflows to build an image for a couple of arches and upload to a registry, fairly easy (not sure if there's an ARM build arch environment for workflows, not looked for it). Testing out the passthrough, device and security semantics - that will be the tricky part. With a chunk of testing time I could say it supported ARM and certain Linux distro's on intel, but YMMV with a container on other platforms due to that hardware interaction. The native USB aspect makes it a bit of a different job from containerising a web service.

@dannystaple dannystaple added this to the 1.2.0 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants