I'm trying to transfer a Flask web app to a Raspberry Pi 4b using Docker. The container runs flawlessly on AMD architecture. The ARM architecture is to be tested on the Raspberry. The creation of the image based on python3.12-bookworm and the container creation work without problems on the Raspberry. The container starts and runs. As soon as I call up a page from the website using a browser, I get the error message 'internal server error'.
The following image shows the apache2/error.log from the container.
The directory /usr/local/lib/..../pydantic_core looks like this. There are obviously problems with '_pydantic_core.cpython-312-aarch64-linux-gnu.so'. Does anyone have a solution for this problem?
meanwhile i found, that Python is missing a symbol: /usr/local/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-aarch64-linux-gnu.so: undefined symbol: PyErr_GetRaisedException. But how can i fix that?
I'm trying to transfer a Flask web app to a Raspberry Pi 4b using Docker. The container runs flawlessly on AMD architecture. The ARM architecture is to be tested on the Raspberry. The creation of the image based on python3.12-bookworm and the container creation work without problems on the Raspberry. The container starts and runs. As soon as I call up a page from the website using a browser, I get the error message 'internal server error'.
The following image shows the apache2/error.log from the container.
The directory /usr/local/lib/..../pydantic_core looks like this. There are obviously problems with '_pydantic_core.cpython-312-aarch64-linux-gnu.so'. Does anyone have a solution for this problem?
meanwhile i found, that Python is missing a symbol: /usr/local/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-aarch64-linux-gnu.so: undefined symbol: PyErr_GetRaisedException. But how can i fix that?
Share Improve this question edited Nov 19, 2024 at 18:21 Joerg55 asked Nov 19, 2024 at 13:23 Joerg55Joerg55 336 bronze badges 1- Please do not upload images of code/data/errors. Can you edit the question to include the error logs in plain text, and not a screen shot? Including a minimal reproducible example will also be essential to understanding the problem and helping to diagnose it; just an error message and file listing aren't usually enough. – David Maze Commented Nov 19, 2024 at 14:13
2 Answers
Reset to default 0When you build Docker image, then it is built for the architecture of the machine on which the build process was running.
So what you try to do is running the WS GW Interface script, based on broken dependencies...
If I were you, I'd look through my requirements file and remove any system specific requirements and allow pip to decide which to install based on the current system. Sometimes when installing dependencies, they install system specific ones. Also, I'd try removing pydanctic from my requirements file completely since it is most likely being installed as a dependent dependency.