-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
ARM64/PyTorch Fatal Python error: Illegal instruction #744
Comments
I did a test and scanning Nextcloud photos on aarch64 machine, and it worked fine for me. FYI, I am using Rock 4SE (4Gb) with NVMe drive. In general, it is almost the same as RPi. I run docker, not podman. My docker-compose.yml is not modified. I rebuilt all images yesterday from source, including base and dependencies. |
For me, I also have the same problem, even after pulling the latest docker-files as described on the website (https://docs.librephotos.com/1/standard_install/). Attached is the log for the backend container, which is throwing the error. For me this happens when a scan of the filesystem is started. |
I've read on other projects that PyTorch might be compiled for What has changed since November is the release of Pytorch 1.13, and this is the version currently shipped with the Docker image : $ podman exec -it librephotos-backend pip show torch
Name: torch
Version: 1.13.0 There is an open issue on the PyTorch repository: pytorch/pytorch#90535 . I tried it, and now I have this issue which is probably unrelated :
|
Downgrading to torch v1.12.0 by executing into the container also seems to work, so that might be a workaround in the meantime |
Probably the same issue as in #738 It could be that this dependency in this line here changed: https://github.com/LibrePhotos/librephotos-docker/blob/00d97785992b8417d82489614d187e38b481288c/backend/base/Dockerfile#L61 We need a custom pytorch dependency, because raspberry pis do not support the whole arm instruction set. We solved this issue by using this 3rd party pytorch dependency: https://github.com/KumaTea/pytorch-aarch64 Would be great if one of you could figure out, which version works correcty as my raspberry pi died a while ago. |
I can help with this, however I am not very experienced in the development of Docker and pythonprojects. So if you have specific instructions, I would be happy to follow them :) |
I've done it for multiple PyTorch versions on Jetson Xavier, sadly they are using It's not hard to build the wheels, you need to install recent versions of the compilation dependencies (like CMake and Ninja). The PyTorch build script is highly parametrized, so you also need to know which acceleration/compute libraries you want to work with and install them as system dependencies. The instructions to compile for Jetson devices can be found here (theoretically, you don't need to apply the patches since they are for CUDA). |
I confirm that my second issue is unrelated, if I set the Gunicorn worker timeout from 30s (default value) to 300s in the The workers did successfully process all pictures without errors, so the fix for the initial problem is to add |
I changed a couple of things in the base image and in the entrypoint file. It would be great, if you could test, if it works again. |
Should work now in general, but the timeout issue still persists. Would be great if somebody else creates a separate issue for the timeout issue. |
The current |
After the downgrade, I don't see any errors. |
π Bug Report
log
files: podman_logs.zipπ Description of issue:
When starting a scan from Nextcloud, the workers are crashing with the error
Fatal Python error: Illegal instruction
, which is coming from PyTorch.The backend is deployed using the
docker-compose.yml
and Podman (4.3), on a Raspberry Pi 4 8Go v1.This is a duplicate of #406, but the bug is still present in both
latest
anddev
Docker images. It was working back in November 2022, but I couldn't make it work since.It looks like every other functionalities (that does not involve scanning new images) are working as they usually do.
π How can we reproduce it:
Start a scan on an ARM64 device running in Docker/Podman.
Please provide additional information:
π» Operating system: Raspberry Pi OS 64bits (Debian 11, up to date), kernel
5.15.84-v8+
.β Architecture (x86 or ARM): ARM64 (armv8)
π’ Librephotos version: 2023-01-30T11:15:53.089771527Z
πΈ Librephotos installation method (Docker, Kubernetes, .deb, etc.): Docker
latest
anddev
π How is you picture library mounted (Local file system (Type), NFS, SMB, etc.): Local filesystem as Docker volume
Bellow is the slightly modified
docker-compose.yml
Iβm using :The text was updated successfully, but these errors were encountered: