How to record sound by usb mic device in docker on Jetson Nano

I continued trying that asound command works properly.

Using following options, I succeeded to let asound be able to work.

–net=host --runtime=nvidia -v /usr/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu -v /lib/aarch64-linux-gnu:/lib/aarch64-linux-gnu -v /tmp/.X11-unix:/tmp/.X11-unix:rw --device=/dev/snd -v /dev/snd:/dev/snd:ro --device=/dev/bus/usb -v /dev/bus/usb:/dev/bus/usb:ro -e DISPLAY=:0 --device=/dev/video0 -v /lib/udev:/lib/udev:ro -v /lib/modules:/lib/modules:ro -v /etc/asound.conf:/etc/asound.conf:ro --privileged -it nvcr.io/nvidia/l4t-base:r32.3.1

※ I don’t know this options are minimum set.

But after several attempts, it stops working with error message.

arecord: main:788: audio open error: No such file or directory

Once this error occurs, it will not work properly until I start over Jetson Nano from the first setup and I’ve not found a trigger of fail happen.

I suspicious that arecord fails to close USB device during running then fails to open it at next running time.