Closed ohthehugemanatee closed 2 years ago
Add a dev container definition, so visual studio code users automatically get an isolated environment in which to work.
I would go ahead and address #8 at the same time, but I'm not sure what system capabilities or devices we need to access to use the GPIO pins.
Given this article: https://blog.hypriot.com/post/drive-neopixels-in-docker/ I believe this argument into run should make it work: docker run --privileged -d node-neopixel
yes, it would work, but that's giving the container root privileges. Usual practice is to use --device
, --cap-add
, and --cap-drop
flags to grant specific linux capabilities or devices. See docker documentation for the list of capabilities included by default and which ones you need to add manually. I just don't know the underlying python module well enough to know what capabilities/devices it needs to communicate with GPIO.
Perhaps --device /dev/gpiomem? https://misterderpie.com/posts/rasperry-pi-four-dht-docker/#:~:text=the%20container%20with-,/dev/gpiomem,-as%20a%20device https://forums.raspberrypi.com/viewtopic.php?t=243166#:~:text=fd%20%3D%20open%20(%22-,/dev/gpiomem,-%22%2C%20O_RDWR%20%7C%20O_SYNC%20%7C%20O_CLOEXEC)%20)%3B%0A%0A//%20Set
Add a dev container definition, so visual studio code users automatically get an isolated environment in which to work.
I would go ahead and address #8 at the same time, but I'm not sure what system capabilities or devices we need to access to use the GPIO pins.