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

RuntimeError when using within Docker container #14

Closed
charliesneath opened this issue Feb 8, 2019 · 7 comments
Closed

RuntimeError when using within Docker container #14

charliesneath opened this issue Feb 8, 2019 · 7 comments

Comments

@charliesneath
Copy link

When running my program within a Docker container, I get the following error, which I believe is related to rpi_ws281xs's ability to interact with the hardware from the Docker container:

RuntimeError: ws2811_init failed with code -9 (Failed to create mailbox device)

Is there a way to make this library work within a Docker container?

Also reported at jgarff/rpi_ws281x#351.

@charliesneath
Copy link
Author

@Gadgetoid Any ideas on this error? Is there additional information I can provide to help debug/evaluate?

@sylvek
Copy link

sylvek commented Feb 12, 2019

@charliesneath Do you run your docker with user 0, group 0 and privileged option?

@charliesneath
Copy link
Author

@sylvek I wasn't setting this explicitly, but I will look into doing so. Do you have any examples?

@sylvek
Copy link

sylvek commented Feb 13, 2019

docker run --privileged … should work.

based on docker is running with root account

@charliesneath
Copy link
Author

@sylvek That did the trick, thank you.

dnsosa pushed a commit to dnsosa/rpi-ws281x-python that referenced this issue Jul 26, 2022
@janblumenkamp
Copy link

Is there any way to get this to work without the --privileged mode? What devices should be mapped to the docker container?

@Gadgetoid
Copy link
Member

Is there any way to get this to work without the --privileged mode? What devices should be mapped to the docker container?

This would be better asked on the repo for the underlying library, since the Python bindings don't affect its limitations - https://github.com/jgarff/rpi_ws281x

However, I suspect the answer is no. But you could paint what I know about Docker on the head of a pin with a firehose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants