-
Notifications
You must be signed in to change notification settings - Fork 153
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
Raspberry Pi support for the docker image #73
Comments
This info might be helpful: https://gist.github.com/neilyoung/8216c6cf0c7b69e25a152fde1c022a5d |
same issue here, docker image for raspberry on wishlist. I am going to look at errors now and will post additional intel later. |
So far it seems the docker image is based an a pure amd64 image: https://hub.docker.com/_/rust?tab=tags Maybe base the Dockerfile image on rust:slim instead of rust:1-alpine. Basically all the rust:alpine are amd64 only. Of course then the Dockerfile need to install using apt-get and not apk, but that should be doable. |
Best guess on dependencies (tried on raspbian, but unfortunately my raspberry shuts down due to overheat during compiling):
To compile on rasbian the rust / cargo should be installed using the installer script https://www.rust-lang.org/tools/install as the rep-version is to old. For the dockerfile it should not be necessary as included in the rust:slim image |
Is there any reason you want a docker rather than using the armhf binary? I use this on my own raspberry pi to bridge to HA without docker, I am not sure why you want to add this as it will put more load onto your pi if you run through docker rather than directly |
Try something like this
sudo apt install \
libgstrtspserver-1.0-0 \
libgstreamer1.0-0 \
libgstreamer-plugins-bad1.0-0 \
libgstreamer-plugins-good1.0-0 \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad
Optional steps to make a service (useful for HA) and keep it running in the background
sudo adduser --system --no-create-home --shell /bin/false neolinker
sudo addgroup --system neolinker
sudo systemctl enable neolink
sudo service neolink start |
Thank you for the pointers. docker support for the raspberries are preferable due to lots of other "iot" pckages are supported that way and makes it easier on the noob users. We use it often with the IOTStack (https://github.com/SensorsIot/IOTstack). The docker images makes it very easy to setup and test with low to none impact on main-system. |
I see, well currently we cross compile the armhf build. So we build it on amd64 for armhf. I do not know if we can make an image without access to an armhf machine to build it. We did do some testing using debian:buster at some point and the last debian build is |
I have not tested any of this. But a few pointers: |
Both cases seem to be done using QEMU, do you think you could work up a PR? The rust armv7 docker seems to be here and the build dependencies are sudo apt-get install --assume-yes --no-install-recommends \
libgstrtspserver-1.0-dev \
libgstreamer1.0-dev \
libgtk2.0-dev With runtime dependencies of sudo apt install \
libgstrtspserver-1.0-0 \
libgstreamer1.0-0 \
libgstreamer-plugins-bad1.0-0 \
libgstreamer-plugins-good1.0-0 \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad There's more info on getting QEMU to work here |
@osos I have been experimenting with a multiarch docker image here: docker pull quantumentangledandy/neolink:rpi-docker-debian Could you tell me if it is working? |
I have been testing on my own rpi and its not quite ready yet but almost got it working :) |
Thank you for the great efforts. I have succeed to sell both my D800 - and, thus, I am unable test neolink on them going forward. I still think it is very much worth it to get this working in docker on Rpi. |
I actually have a working cross compiled docker image for raspberry pi. What I am trying now is to make a multiarch image that supports amd64,arm64,i328 and amrhf, which will take a bit longer but probably worth doing right in the long run. |
So I have a working multiarch build docker pull quantumentangledandy/neolink:rpi-docker It works on my own raspberry pi but if anyone else can test that would be great. It should support amd64, arm64, i328 and armhf |
I tried but failed. Installed docker and pulled quantumentangledandy/neolink:rpi-docker root@dsmr:/home# docker run -p 8554:8554 --restart=on-failure --volume=$PWD/config.toml:/etc/neolink.toml quantumentangledandy/neolink |
@joopy hmm odd it is certainly working on my raspberry pi. Could you give me some details of your os and docker version. Perhaps it's an old docker from before multiarch was added. Maybe you could also show me the log of docker inspect quantumentangledandy/neolink:rpi-docker |
pi@dsmr:~ $ lscpu | grep Arch pi@dsmr:~ $ docker run --rm -p 8559:8554 --volume=/opt/neolinks/config.toml:/home/pi/neolink.toml quantumentangledandy/neolink:rpi-docker /opt/neolinks/config.toml is an emtpy folder? |
Your current error suggests that it is working but that you do not have the correct path to the config.
|
thanks! I can confirm it is working. Mayby a small howto would be nice :) |
The options We do have a section called Docker in the readme. If you were to improve it what would your write? |
Must neolink with docker image work on all type off raspberry pi's? I just tried on a Raspberry pi 1 that isn't working.. |
Not on armv6. I do not believe rust standard libraries supports armv6. |
P.s. how long have you had that v1 for and how did you get Debian buster on it? |
So I will see if I can get armel (v6) to work no guarentees but this suggests it might work if I can find a good enough cross compiler |
@joopy I have an armv6 image, not sure if it works or not but please try, you need to re pull my image docker pull quantumentangledandy/neolink:rpi-docker |
No output.. pi@raspberrypi:~ $ docker pull quantumentangledandy/neolink:rpi-docker |
Nothing at all not even an error message is odd... I expect it to at least say file not found.... Could you set it to a higher logging level docker run -e RUST_LOG=trace --rm -p 8559:8554 --volume=/home/pi/neolink.toml:/etc/neolink.toml quantumentangledandy/neolink:rpi-docker |
If that dosen't work enter bash in the container docker run --rm -it --entrypoint /bin/bash quantumentangledandy/neolink:rpi-docker Check that the neolink binary is at Then inside the containers bash run /usr/local/bin/neolink --help To see if it is running |
No succes.. pi@raspberrypi:~ $ nano /home/pi/neolink.toml |
That's a shame, we are changing how we deploy and install the multi arch docker so it may work after that. But it will take about a week before I can get it and everything else done. I'll ping you when it's ready for a retest if your willing. |
So #76 and #84 make a good first pass at this, thanks for working out the kinks (particularly Alpine's ARM stuff). However, I've just noticed that the docker/build-push-action now supports buildx directly. It looks like a really clean way to do multiarch Docker builds. I think I'd like to try to merge the two existing PRs' approaches with v2 of the action. |
Oh, dang. I apologise for not reading closely. I will take another look.
|
Is your feature request related to a problem? Please describe.
Yes. the docker image does not run on raspberry pi
Describe the solution you'd like
Would like a docker image compiled for arm to enable the use of this brilliant bridge on the raspberries. This would in turn enable ll users of Home Assistent and other DIY setups to benefit from your work.
The text was updated successfully, but these errors were encountered: