When I run the command on my SBC:
docker run --volume $(pwd):/home/octoprint --device /dev/ttyUSB0:/dev/ttyACM0 -p 5000:5000 --name octoprint octoprint/octoprint:1.4.0-python3
Everything works normally; I can open the octoprint screen and my 3D printer is recognized without any problems.
However, when I try to run the equivalent --device /dev/ttyUSB0:/dev/ttyACM0 to be mapped as any type of volume as possible, I am unable to make an equivalent configuration.
Please, how do I get Rancher to recognize a --device?
Assuming you are talking about Kubernetes Rancher. The common way is to use
privilegedin the SecurityContext of your Pod or Container.For example:
A more advanced way of supporting host devices is Device Plugins. But I believe of standard USB the above should work. You might also want to use NodeAffinity to make sure that your Pod lands where your device is.
✌️