I am building a swarm of Rpi/Pisound streaming hydrophones at
live . orcasound . net. I want to use Balena to manage them.
I wonder if anyone had been able to install Pisound on a Rpi via a Dockerfile.
My Dockerfile sets USER root and WORKDIR /root and then installs curl
Then it tries to install pisound via curl as blokas recommends:
This reports error: SSL certificate problem: unable to get
[main] local issuer certificate
When installing directly on the Rpi, no certificate issues arise.
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::=“–force-confold”
Set default command to bash as a placeholder
CMD [“/bin/bash”]
Make sure we’re the root user
USER root
WORKDIR /root
Install required libraries
RUN apt-get update && apt-get install -y --no-install-recommends
curl
RUN curl https://blokas.io/pisound/install.sh | sh
RUN apt-get update
RUN arecord -l
Here is the full result of pushing this Dockerfile: (replacing . by dot and http by ++++ to reduce number of links below 3
val@pop-os:~/balenaFiles/bal-1/pisound$ balena push val-one
Update: if I add -k --insecure to the curl line, I get past the certificate problem and run into sudo problems. When installing pisound via this install.sh directly in a Rpi terminal window, the sudo is accepted but here, building an image for the Rpi, it seems that sudo needs to be responded to somehow.
[main] Step 8/10 : RUN curl https://blokas.io/pisound/install.sh -k --insecure | sh
[main] —> Running in 7b8a25e04b64
[main] % Total % Received % Xferd Average Speed Time Time Time Current
[main] Dload Upload Total Spent Lef
[main] t Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 1271 100 1271 0 0 2875 0 --:-
[main] -:-- --:–:-- --:–:-- 2882
[main]
[main] Importing Blokas GPG public key…
[main] sh: 18: sudo: not found
[main]
I have simplified and brought all the code into the Dockerfile and debugged a bit and now have I hope just one small issue.
I put my Dockerfile and a data dump up on github at:
(GitHub - orcasound/minBalenaPisound)
Please take a look as see if there is a fix to the error after line 315:
316 main] Step 16/18 : RUN apt-get -y install pisound
[main] —> Running in af87d9bd5327
[main] Reading package lists…
[main] Building dependency tree…
[main] Reading state information…
[main] Some packages could not be installed. This may mean that you have
[main] requested an impossible situation or if you are using the unstable
[main] distribution that some required packages have not yet been created
[main] or been moved out of Incoming.
[main] The following information may help to resolve the situation:
[main] The following packages have unmet dependencies:
[main] pisound : Depends: pisound-btn (>= 1.13-1) but it is not going to be installed
[main] Depends: pisound-ctl (>= 1.03-1) but it is not going to be installed
[main] E: Unable to correct problems, you have held broken packages.
Thank you for helping get pisound to install under Docker
I have simplified and brought all the code into the Dockerfile and debugged a bit and now have I hope just one small issue.
I put my Dockerfile and a data dump up on github at:
(GitHub - orcasound/minBalenaPisound)
Please take a look as see if there is a fix to the error after line 315:
316 main] Step 16/18 : RUN apt-get -y install pisound
[main] —> Running in af87d9bd5327
[main] Reading package lists…
[main] Building dependency tree…
[main] Reading state information… [main] Some packages could not be installed. This may mean that you have [main] requested an impossible situation or if you are using the unstable [main] distribution that some required packages have not yet been created [main] or been moved out of Incoming.
[main] The following information may help to resolve the situation:
[main] The following packages have unmet dependencies:
[main] pisound : Depends: pisound-btn (>= 1.13-1) but it is not going to be installed
[main] Depends: pisound-ctl (>= 1.03-1) but it is not going to be installed
[main] E: Unable to correct problems, you have held broken packages.
I thank whoever can help get pisound to install under Docker
The pisound-btn, pisound-ctl and the rest of the related software is not necessary for recording and playing audio via Pisound, they’re needed if you need the button functionality or use the Android Pisound App.
I haven’t ever tried getting audio to work with Docker, it may not be trivial. I’ve found this article: Docker Container Audio - Lei Mao's Log Book the key elements seem to be installing the general ALSA software, as well as letting the Docker container access the /dev/snd of the host OS. I don’t know if the kernel running inside the Docker must have the Pisound kernel module built and installed for it, or if it’s enough to have the host OS have it.
So the first step would be to get the audio flowing, without worrying about the button software for now.
By the way, are you sure that Docker is the right solution?
Are you looking for a way to create an SD card image for use with Raspberry Pi’s?