Skip to content
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

Providing a docker/image for "linux/arm/v7" (raspberry pi) ... could be marvelous ! #2349

Open
manatlan opened this issue Nov 13, 2024 · 7 comments

Comments

@manatlan
Copy link
Contributor

Is your feature request related to a problem? Please describe.
no

Describe the solution you'd like
Providing a docker/image for "linux/arm/v7" (raspberry pi) ... could be marvelous !

Describe alternatives you've considered
I tried a docker-compose of the github repo, with no luck (compilation trouble)
But I'm really not an expert ... perhaps an expert could help ?

Additional context
it could be marvelous to have a docker running on a simple raspberry pi !

@hqnicolas
Copy link

hello dear, docker for arm v7 isn't possible
try an armv8 device as me
i'm using RK3566
https://forum.armbian.com/topic/28895-efforts-to-develop-firmware-for-h96-max-v56-rk3566-8g64g/

@manatlan
Copy link
Contributor Author

manatlan commented Nov 14, 2024

Do you known what components are problematic for armv7 ?
Perhaps I could help to fix them.

If they are related to gui or vnc ... I don't need them for api only

@foxfire52
Copy link
Contributor

foxfire52 commented Nov 14, 2024

@manatlan The project uses seleniarm/node-chromium as base image. I think the selenium maintainers don't provide an armv7 image. You could ask here https://github.com/SeleniumHQ/docker-selenium
Also SeleniumHQ/docker-selenium#1076

I think the easiest way to support armv7 would be a different base image without selenium, though with a reduced number of working providers. You could try starting from that.

@foxfire52
Copy link
Contributor

@manatlan Try replacing the first line in Dockerfile

FROM seleniarm/node-chromium
ARG G4F_VERSION
ARG G4F_USER=g4f
ARG G4F_USER_ID=1000

with
FROM seleniarm/node-chromium:4.18.1-20240326
Then run docker compose up --build on your arm device.

It's an older selenium docker image with armv7 support.

@manatlan
Copy link
Contributor Author

I tried ... but got this problem

80.45             building '_cffi_backend' extension
80.45             creating build/temp.linux-armv7l-cpython-311/src/c
80.45             arm-linux-gnueabihf-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DFFI_BUILDING=1 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.11 -c src/c/_cffi_backend.c -o build/temp.linux-armv7l-cpython-311/src/c/_cffi_backend.o
80.45             src/c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
80.45                15 | #include <ffi.h>
80.45                   |          ^~~~~~~
80.45             compilation terminated.
80.45             error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
80.45             [end of output]
80.45       
80.45         note: This error originates from a subprocess, and is likely not a problem with pip.
80.45         ERROR: Failed building wheel for cffi
80.45       Failed to build cffi
80.45       ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi)
80.45       [end of output]
80.45   
80.45   note: This error originates from a subprocess, and is likely not a problem with pip.
81.81 error: subprocess-exited-with-error
81.81 
81.81 × pip subprocess to install build dependencies did not run successfully.
81.81 │ exit code: 1
81.81 ╰─> See above for output.
81.81 
81.81 note: This error originates from a subprocess, and is likely not a problem with pip.

it can't build cffi ;-(
any ideas ?

@foxfire52
Copy link
Contributor

foxfire52 commented Nov 17, 2024

@manatlan Try adding this


RUN apt-get -qqy update \
&& apt-get -qqy install libffi-dev

At line 40 of Dockerfile

&& apt-get -qyy remove openjdk-11-jre-headless \
&& apt-get -qyy autoremove \
&& apt-get -qyy clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
# Update entrypoint
COPY docker/supervisor.conf /etc/supervisor/conf.d/selenium.conf
COPY docker/supervisor-gui.conf /etc/supervisor/conf.d/gui.conf

This should fix the missing ffi.h file dependency

@foxfire52
Copy link
Contributor

There's a new update, hlohaus added a slim Dockerfile without selenium dependency.

You should try that docker image too, I think it should work.
Download repository latest version and run

docker-compose -f docker-compose-slim.yml up -d --build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants