Skip to content

Can not work in docker container #10

@Hongfei-Niu

Description

@Hongfei-Niu

When I ran the scripts pixels in docker container, it just has error like the following.

 File "/usr/local/src/test/mics_hat/interfaces/pixels.py", line 74, in <module>
    pixels = Pixels()
  File "/usr/local/src/test/mics_hat/interfaces/pixels.py", line 21, in __init__
    self.dev = apa102.APA102(num_led=self.PIXELS_N)
  File "/usr/local/src/test/mics_hat/interfaces/apa102.py", line 90, in __init__
    self.spi.open(bus, device)  # Open SPI port 0, slave device (CS) 1
FileNotFoundError: [Errno 2] No such file or directory

I am not familiar with the spidev, and not sure if linking the relevant device, when I ran the container, could fixed this error, like (docker run --device $path1:$path2 -it $image_id /bin/bash)

If I am right, could you please help me find the path of the device.
if I am wrong, could you please help me out with it.

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