-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add support for ARM #7
Comments
Hey There,
Node.js v8.x: # Using Ubuntu
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs refer to: https://github.com/nodesource/distributions/blob/master/README.md yarn: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn refer to : yarnpkg/yarn#2821
git clone into Grafana external plugins folder.
yarn install --pure-lockfile
yarn run build
cd /var/lib/grafana/plugins/grafana-image-renderer/
cp plugin_start_linux_amd64 plugin_start_linux_arm
cd /var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/
mv chrome chrome.bak
cp /usr/bin/chromium-browser /var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/chrome Hey @andre2308 ,have a try. maybe it fixes your issue too. Best Regards |
Hey @ThoZed, Meantime i think My mainproblem is the „custom“ Linux Version from Synology with no apt-get... I Managed to install make with entware and glibc. Then the Build process will run a Bit, stops with make: cc: command Not found.. i have no clang Compiler or Build-essentials on entware-Ng or opt. With Export cc=gcc before, it will compile, make the arm startup file and then crashed grafana by startup, with the Message „plugin exit before we could connect“ from RenderingService |
Please try out the new build/packaging of this just merged to master, see https://github.com/grafana/grafana-image-renderer#packaging |
Phantomjs isnt working anymore so I tried to clone the grafana-image-renderer into the plugin folder as instructed in the readme as I dont have grafana-cli 6.4 on rasbian to use that method, but the yarn install --pure-lockfile gives me the following errors on Raspbian GNU/Linux 10 (buster) : Any suggestions/tips? |
@Creamers158 seems like pre-built binaries for grpc v1.11.3 on arm are not available, only arm64. Not sure that there are prebuilt grpc node binaries at all for arm. I don't currently have an arm device so hard for me to help out. Seems like the only way is to build it from source and looking at your error seems like it tries to compile it but fails. Maybe your lacking some dependency like node-gyp and/or C++ build tools? I would start with trying to install node-gyp: npm install -g node-gyp Then grpc: npm install grpc@1.11.3 --build-from-source |
When I visit this list of prebuilt binaries linked to from the readme Packaging section, I see listings for both Does this mean Or is building locally with |
FWIW, I got the docker to build on a rpi4. Here is the patch I applied to the Dockerfile, based on info gathered left and right:
|
Thanks for this diff @koying. I can confirm that this works on a Raspberry Pi 3! |
Thanks. I can confirm this also works on a Raspberry Pi 4. |
I pushed the image I created. This docker-compose.yml is working on a Raspberry Pi 4
|
Is |
@dpsenner ARM is currently not supported. See above for workarounds building custom docker image |
+1 for making it work on Rpi "out of the box" (i.e. without having to build custom docker images). Where is the "upvote" button? |
+1 for supporting this plugin on ARM architecture. Thanks a lot! |
I created a fork which can be built and run on ARM |
Based on the current master I was able to build for arm64 and arm/v7, with the following steps (happy to provide a PR):
and the following
If you want to test: I am running Grafana and the renderer on k8s and I am happy to provide the deployment and service and the changes I made to the helm chart as well if it helps |
+1 for making it work on Rpi - Please without having to build custom docker images! Thank you very much!! |
Well, the image still has to be built but it is not custom since using the Dockerfiles from master. I definitely hope that docker buildx makes it to the default so that multi-arch images get pushed to dockerhub |
It's a pitty that this plugin can't be installed in openHABian Grafana environments out-of-the-box. |
+1, it is a bit weird that one feature is forcefully removed and the other replacement is not built for the arm platform. A lot of people uses grafana on RPis to visualise data. Why not to support these people? Since November 2018 nobody has thought of this? Now I can read only this in every email from Grafana. No image renderer available/installed. |
Gents,
Help yourselves a little bit :) |
@koying, thanks for the heads up. You might want to read this blog post first. The Grafana Image Render plugin and Docker image are currently not supported on ARM architectures. There’s an open GitHub issue requesting ARM support that includes some suggestions from the community on how you could get it to work. We kindly ask users of ARM devices who want support to upvote the issue and share any information that could be valuable for your use case. With enough interest we will prioritize this. We’re of course always happy to receive contributions, if anyone is interested. Many people using grafana or RPis especially in Home Automations use cases. Tracking temperature, air quality, power consumption, doors/windows being open close etc. The images rendered are displayed on panels or used by alert emails. Myself, I use grafana with SmartThings and Telegraph. I use the alert emails to track the quality of my internet connection. Purely ping. And I appreciate what you are saying, but I didn't want to spend hours building a Docker image, what I haven't got really experience with it. And meanwhile solving zillions of other issues. Otherwise it is issue #7 and dates back 2 years almost. Wow... |
Regarding "ARM32 will disappear sooner than latter": Currently ARM32 boards are still sold widely. And when you buy one today you likely want to use it 2-3 years before you replace it. So, "sooner" very likely will be at least 3 years in the future from now. |
+1 ... I am using Grafana in combination with Node-RED and Influx.DB on a RPi 3B+ (so ARMv7 based bare metal installtion). It works flawlessly and with awesome performance. No need to upgrade to Pi4 anytime soon really. As @Wolfgang1966 said: ARM32 will still be arround for years and will be ideally suited for jobs like this. Take a Jeston Nano SBC for example. It is popular like nothing else right now and what architecture is is based on? ARM32 / ARMv7 You asked to upvote this thread? Here is my upvote +1! |
I tried it, but it does not work. I had already nodejs installed
yarn is folder is /usr/bin/yarn instead of /usr**/local**/bin/yarn after changing the grafana.ini I can not enter the grafana webseit with ip:3000. `root@raspberrypi:~# cd /var/lib/grafana/plugins changed 1 package, and audited 2 packages in 3s found 0 vulnerabilities root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# tail -100f /var/log/grafana/grafana.log When I change the grafana.ini back, then atleast i could visit the website. Buth when I click on share on a Dashboard it displays "Image renderer plugin not installed" Do you have any tip? |
Got an Apple M1 Pro myself and we're running Grafana on Linux containers (well, AWS Fargate to be precise) but I'd like to "test" my Grafana image locally which is currently not possible:
Any news on ARM support? |
Im running this Dockerfile on Pi4 successfully
|
@eliaz thank you for sharing. I got the container working but I had to configure grafana to tell the renderer to use the public IP of the grafana host, not localhost. I'm a bit new to containers so maybe it could have been resolved in another manner. The key issue is that the grafana-render container could not do a 'callback' to grafana. The original non-container installation process I've documented earlier in this thread was hosed because On Ubuntu chromium is installed through snap and snap started to fill my /tmp directory with garbage, causing a write load on the SD card, causing all kinds of intermittent issues. So I snapped and now I'm in the process of moving everything away from Ubuntu to Debian. |
Any progress on this? ARM support is critically important for us |
@louwrentius try appending the following to your extra_hosts:
- host.docker.internal:host-gateway With this you should be able to use the following in the callback_url = http://host.docker.internal:3000 In a non-productive environment, you could also try something like |
For anyone looking for a copy-paste BYO solution, I've modified the Dockerfile kindly provided by @eliaz to be a little slimmer (based on the official Dockerfile provided by Grafana). FROM node:16-alpine AS base
ENV CHROME_BIN="/usr/bin/chromium-browser"
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
ENV IMAGE_RENDERER_SOURCE_VERSION="3.7.1"
WORKDIR /usr/src/app
RUN apk --no-cache upgrade \
&& apk add --no-cache udev ttf-opensans unifont chromium ca-certificates dumb-init \
&& rm -rf /tmp/*
FROM base as build
RUN apk add --no-cache curl unzip
RUN curl -L -o grafana-image-renderer.zip https://github.com/grafana/grafana-image-renderer/archive/refs/tags/v$IMAGE_RENDERER_SOURCE_VERSION.zip \
&& unzip grafana-image-renderer.zip \
&& mv grafana-image-renderer-$IMAGE_RENDERER_SOURCE_VERSION grafana-image-renderer \
&& rm -f grafana-image-renderer.zip
WORKDIR /usr/src/app/grafana-image-renderer
RUN yarn install --pure-lockfile
RUN yarn run build
FROM base
ENV NODE_ENV=production
COPY --from=build /usr/src/app/grafana-image-renderer/node_modules node_modules
COPY --from=build /usr/src/app/grafana-image-renderer/build build
COPY --from=build /usr/src/app/grafana-image-renderer/proto proto
COPY --from=build /usr/src/app/grafana-image-renderer/default.json config.json
COPY --from=build /usr/src/app/grafana-image-renderer/plugin.json plugin.json
CMD [ "node", "build/app.js", "server", "--config=config.json"] |
Sweet, "My" solutions was actualy done with a few iterations in gpt4-code interpreter, not me...nice to see humans are still superior! |
Any update from the "official" side? The issue is over 5 years old and pretty surprising that this is not implemented yet. Especially now Apple is having the M1/M2 laptops.. |
The ARM64 build exists since a few months. What are you missing? I would say this issue can be closed. |
Sadly there is still no solution for ARM 32bit: This is a bit of a pitty for long term users and fans that are stuck on an older hardware (e.g. a Raspberry Pi3 based setup) |
Well: https://github.com/grafana/grafana-image-renderer/releases/tag/v3.10.0 Unless I see the Asset in the releases I do not consider it to be released/supported: https://github.com/grafana/grafana-image-renderer/releases/tag/v3.10.0 |
I'm afraid I've missed something. Would you be so kind and tell me where can I get ARM64 compatible source? Im my Grafana container: Thank You |
Linux Nehebkau 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux |
Is there still hope for a ARM32 version? |
I need to get arm64 related grafana-image-renderer plugin. if not please guid me to build it |
@smuthugala you can run it as a remote server in HTTP mode if you need ARM64. |
@evictorero thanks for the update . I ran "docker run -d --name=grafana-image-renderer -p 8081:8081 grafana/grafana-image-renderer". and updated /opt/grafana/conf/grafana.ini below value. [rendering] but i'm getting white page once i rendering. its gave 404. |
@smuthugala Are you running grafana in docker, too? Then |
The docker image has been change to support this. If needed for plugin, please create another issue. Closing this one |
Hey,
is there any plans to support arm CPUs?
I'am using a Synology DS216play with a STM STiH412 CPU.
When i want to install the image rendering, yarn throw me these errors:
yarn log.txt
with Google i found out that node grpc supports arm after Version 1.4.1.
Or is there a way to Cross Compile it?
Thank you
The text was updated successfully, but these errors were encountered: