这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@return42
Copy link
Member

@return42 return42 commented Oct 5, 2024

Alpine Linux uses musl libc (instead of glibc). However, there is no pre-build of the pydantic-core python package for musl lib on armv7. Alternatively this patch installs py3-pydantic-core from Alpine packages [1]

[1] https://pkgs.alpinelinux.org/package/edge/community/armv7/py3-pydantic-core


I currently have no opportunity to test the patch .. maybe one of you has the opportunity .. would be a great help.

Alpine Linux uses musl libc (instead of glibc). However, there is no pre-build
of the pydantic-core python package for musl lib on armv7.  Alternatively this
patch installs py3-pydantic-core from Alpine packages [1]

[1] https://pkgs.alpinelinux.org/package/edge/community/armv7/py3-pydantic-core

- closes: searxng#3887

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and ran it locally, works as expected!

@Bnyro Bnyro merged commit 5332d3a into searxng:master Oct 6, 2024
8 checks passed
@return42 return42 deleted the fix-3887 branch October 6, 2024 10:00
@vojkovic
Copy link
Member

vojkovic commented Oct 6, 2024

This won't work from my understanding...

Failed in: https://github.com/privau/searxng/actions/runs/11200672904

@vojkovic
Copy link
Member

vojkovic commented Oct 6, 2024

Adding py3-pydantic and removing pydantic from requirements.txt fixed the build for me. @return42

privau/searxng@e8a9550
https://github.com/privau/searxng/actions/runs/11200730114

I can compose a PR really quickly if you would like.

@return42
Copy link
Member Author

return42 commented Oct 6, 2024

Seems alpine is pydantic-core 2.24.0-r0 while pydantic==2.8.2 requires pydantic_core-2.20.1 ?

#24 220.6 Collecting pydantic-core==2.20.1 (from pydantic==2.8.2->-r requirements.txt (line 19))
#24 220.6   Downloading pydantic_core-2.20.1.tar.gz (388 kB)
#24 220.6      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 388.4/388.4 kB 18.6 MB/s eta 0:00:00

@return42
Copy link
Member Author

return42 commented Oct 7, 2024

Adding py3-pydantic and removing pydantic from requirements.txt fixed the build for me. @return42

privau/searxng@e8a9550 https://github.com/privau/searxng/actions/runs/11200730114

I can compose a PR really quickly if you would like.

Yes, please 👍 send us your PR ... not sure I really understand the solution, but this can be discussed in the PR.

@vojkovic
Copy link
Member

vojkovic commented Oct 7, 2024

Yes, please 👍 send us your PR ... not sure I really understand the solution, but this can be discussed in the PR.

@return42

I just realised that people use SearXNG outside of Docker, so my solution won’t work. My initial idea was to install Pydantic via Alpine's package manager, but that's not feasible since you can't have both installations (pip & alpine) concurrently.

I’ll just leave it to you to decide how to proceed. The issue seems to be limited to armv7, affecting only a small number of devices (mainly the Pi 2 and below). Personally, I think it might be worth considering dropping support for armv7 entirely.

I’m curious if anyone is actually using Docker on these devices since we're really only talking about a handful of SoCs that can run Docker and don’t support armv8/aarch64.

@unixfox
Copy link
Contributor

unixfox commented Oct 7, 2024

You can also say the contrary, who cares about the favicon feature. One would just want a search function, that's it.

I think this is sad to talk about removing an entire CPU architecture that works fine for everything except one small feature.

There are indeed ARMv7 users: searxng/searxng-docker#239. Let's not remove this CPU architecture.


Anyway back to actually find a real solution for this issue: #3887 (comment)

@return42 return42 added the armv7 label Oct 7, 2024
@return42
Copy link
Member Author

return42 commented Oct 7, 2024

You can also say the contrary, who cares about the favicon feature. One would just want a search function, that's it.

Yeah, that is really true 😆 .. I fully agree, we have to fix the CPU arch .. I created an issue in the pydantic-core repo:

But I expect we need a interim solution, it will take its time before we have a pre-build.

@vojkovic
Copy link
Member

vojkovic commented Oct 7, 2024

You can also say the contrary, who cares about the favicon feature. One would just want a search function, that's it.

Evidently, people DO care about the favicon feature, as seen in the issues, PRs and comments over the past three years:
#441
#1014
#2350
https://github.com/searxng/searxng/issues/3184
#3727 (comment)
#3727 (comment)
#3727 (comment)
#3727 (comment)

Also please do keep in mind, this isn't an issue with the favicons, it's due to the pydantic module, which was introduced in Markus' commit: 7ab577a

I presume he knows more about this module than I do, and it may be easier for him to simply rewrite the solution using another module instead.

I think this is sad to talk about removing an entire CPU architecture that works fine for everything except one small feature.

There are indeed ARMv7 users: searxng/searxng-docker#239. Let's not remove this CPU architecture.

Sure, obviously it's not ideal - but currently we have 0 images building for any architecture which roadblocks deploying all future development. Even as a temporary measure, to start building images again, we shouldn't block 99.5% of all deployments because of a few users who can wait a little longer for a fix to come along later down the line.

I have a this exact board this poster is using, aarch64 works fine on my 64bit OS. The poster is probably using the 32bit version of raspbian (on a 64 bit processor mind you), which no one in the issue seemed to notice.

Anyway back to actually find a real solution for this issue: #3887 (comment)

And please do - let's fix it for all architectures, I'm only saying that I won't be assisting any further due to my limited expertise in this. I'm only offering my advice. 👍

@return42
Copy link
Member Author

return42 commented Oct 7, 2024

it's due to the pydantic module

We will need pydantic, not only for favicons .. we will needed as @dalf mentioned in a comment (long time ago) / https://pydantic-docs.helpmanual.io/ :

When I look at pydantic, I feel we could replace a lot of code by way more clear models (settings, preferences, engines, etc...)


Even as a temporary measure, to start building images again, we shouldn't block 99.5% of all deployments because of a few users who can wait a little longer for a fix to come along later down the line.

I think you're right, but I also think that we don't have any critical bugfixes or anything like that in the loop at the moment ... so I would like to wait a few more days and hope that we can find a solution for pydantic-core on armv7 (musl).

I have a this exact board this poster is using, aarch64 works fine on my 64bit OS. The poster is probably using the 32bit version of raspbian (on a 64 bit processor mind you), which no one in the issue seemed to notice.

Is it so? .. I'm really sorry, I'm not familiar with docker and all the github CI actions .. It just shows even more that we (at least I) need help from the community ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker build fails on installing pydantic-core [linux/arm/v7]

4 participants