Cannot find picoscope from docker

Post your Linux discussions here
Post Reply
ykyohei
Newbie
Posts: 0
Joined: Thu Jan 20, 2022 6:36 am

Cannot find picoscope from docker

Post by ykyohei »

I'm using Picoscope 3403D MSO and it is working as long as the container is privileged.
If I use the non-privileged container, picosdk cannot find the device.

Code: Select all

picoscope_1              | 2022-01-20T05:41:42+0000 run_single:1 CRASH: [Failure instance: Traceback: : PicoSDK returned 'PICO_NOT_FOUND'
picoscope_1              | /usr/lib/python3.8/threading.py:932:_bootstrap_inner
picoscope_1              | /usr/lib/python3.8/threading.py:870:run
picoscope_1              | /usr/local/lib/python3.8/dist-packages/twisted/_threads/_threadworker.py:47:work
picoscope_1              | /usr/local/lib/python3.8/dist-packages/twisted/_threads/_team.py:181:doWork
picoscope_1              | ---  ---
picoscope_1              | /usr/local/lib/python3.8/dist-packages/twisted/python/threadpool.py:238:inContext
picoscope_1              | /usr/local/lib/python3.8/dist-packages/twisted/python/threadpool.py:254:
picoscope_1              | /usr/local/lib/python3.8/dist-packages/twisted/python/context.py:118:callWithContext
picoscope_1              | /usr/local/lib/python3.8/dist-packages/twisted/python/context.py:83:callWithContext
picoscope_1              | pico_agent.py:55:run_single
picoscope_1              | /app/socs/socs/agent/class_ps3000a.py:30:__init__
picoscope_1              | /usr/local/lib/python3.8/dist-packages/picosdk/functions.py:160:assert_pico_ok
picoscope_1              | ]
picoscope_1              | 2022-01-20T05:41:42+0000 run_single:1 Status is now "done".
I would like to keep the privileges of the container as small as possible but how can I reduce and still find the device?

The following is the part of docker-compose.yml I tested.
The former works, but the latter doesn't work. PicoSDK cannot find device.

Code: Select all

picoscope:
    image: picoscope-agent
    hostname: nuc
    privileged: true

Code: Select all

picoscope:
    image: picoscope-agent
    hostname: nuc
    cap_add:
      - ALL
    volumes:
      - /dev:/dev

Post Reply