YunoHost-Apps / librephotos_ynh

Librephotos package for YunoHost
https://github.com/LibrePhotos/librephotos
MIT License
5 stars 3 forks source link

Install failed on ARM (ynh 4.2 rpi4b) #6

Open stevenmache opened 3 years ago

stevenmache commented 3 years ago

Rpi4d Ynh 4.2.0 Ssh No

Hi, I wanted to test the install on my server even if the packadge is new. I installed it on its own subdomain.

It seems to be a problem with conf / dependencies. Here is the install log : https://paste.yunohost.org/raw/afotoyosud

Many thanks for the packadge, I am really looking for this one ! Steven

Jules-Bertholet commented 3 years ago

WARNING - /usr/share/yunohost/helpers.d/utils: line 204: ../sources/patches/backend-*.patch: No such file or directory ? Strange… Honestly I have no clue what could be causing this

Jules-Bertholet commented 3 years ago

@ericgaspar

ericgaspar commented 3 years ago

Considering that 4.2 is used here, it could be a regression. I have no idea what is causing this problem ... maybe @alexAubin could help (sorry Aleks for the patate chaude 😅).

centralscrutinizer21 commented 3 years ago

Rpi4 Ynh: 4.1.7.4 Installed through web admin page

Failed to install for an error related to pytorch: https://paste.yunohost.org/raw/iyoquzeyux

Jules-Bertholet commented 3 years ago

It looks like there is no ARM build of pytorch of the right version. It may be possible to get it to work with an unofficial build, but I don't own an ARM device that can run YunoHost so I can't help with that. I guess I add a warning that the package isn't compatible with ARM…

stevenmache commented 3 years ago

There is this page dedicated to arm, but it states that it may not work (yet) https://docs.librephotos.com/1/arm_install/

centralscrutinizer21 commented 3 years ago

That's a pity, it looks like an interesting project, to integrate with NC. I will stick with Piwigo for now

Jules-Bertholet commented 3 years ago

https://hub.docker.com/layers/radicand/librephotos-backend-arm/latest/images/sha256-dde1ff976055a82ad362ec5a549dfe556b736e49c44986814067bd6d17a19c7f?context=explore ← I suspect this is where to look to get it to work on ARM. But again, someone with an ARM device will have to figure it out, not me

Jules-Bertholet commented 3 years ago

@centralscrutinizer21 could you try to install PR #12 on your RPi? I have changed the PyTorch version, it may work now (but I'm not sure)

centralscrutinizer21 commented 3 years ago

Still failing: https://paste.yunohost.org/raw/kovuvocehi I tried installing the testing version with sudo yunohost app install https://github.com/YunoHost-Apps/librephotos_ynh/tree/testing --debug Correct?

Jules-Bertholet commented 3 years ago

@centralscrutinizer21 Pushed a new commit, could you try it again?

centralscrutinizer21 commented 3 years ago

Same https://paste.yunohost.org/raw/kovuvocehi

Jules-Bertholet commented 3 years ago

https://paste.yunohost.org/raw/kovuvocehi This is the link to the log of your old install attempt, could you please post the new log?

centralscrutinizer21 commented 3 years ago

Sorry my bad https://paste.yunohost.org/raw/totizururu

tiritibambix commented 3 years ago

Rpi3B

Same from admin page : https://paste.yunohost.org/raw/isohupuhec

And same with testing branch : https://paste.yunohost.org/raw/eyebipizil

mikerjensen commented 3 years ago

Same problem on the RPI4 with the latest Yunhost update.

Jules-Bertholet commented 3 years ago

I've put in some more extensive work/testing on this. The latest master should work on aarch64 now (64 bit only, not 32), but once again I don't have an actual ARM device to test.

mikerjensen commented 3 years ago

Thanks much for trying to get this to work. I just tried to do an install with the latest yunohost (4.2.6) on an aarch64 RPI4. And got:

Collecting torch==1.8.0 2021-06-12 00:37:06,340: DEBUG - Downloading torch-1.8.0-cp39-cp39-manylinux2014_aarch64.whl (45.2 MB) 2021-06-12 00:37:25,264: DEBUG - ERROR: Could not find a version that satisfies the requirement torchvision==0.9.0 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.9.1) 2021-06-12 00:37:25,266: DEBUG - ERROR: No matching distribution found for torchvision==0.9.0

I also tried command line with the testing tree: yunohost app install https://github.com/YunoHost-Apps/librephotos_ynh/tree/testing --debug

and got the same result. Sorry, i'm not so familiar with the yunhost app development installation process, so I am not sure if i'm testing the 'latest master' by doing the above. Full installation debug here: https://paste.yunohost.org/raw/owuhayurox

Jules-Bertholet commented 3 years ago

@mikerjensen Thanks for the test! The code to detect the architecture had a bug (it looked for arm64 instead of aarch64). Should be fixed now—can you try testing the version from Git again?

mikerjensen commented 3 years ago

@Jules-Bertholet i just ran the install for the Git version, and got a similar, though slightly different error. So hopefully one bug down, and only one to go:-)

2021-06-13 19:47:13,555: DEBUG - Looking in links: https://download.pytorch.org/whl/torch_stable.html 2021-06-13 19:47:16,720: DEBUG - ERROR: Could not find a version that satisfies the requirement torch==1.8.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.8.0, 1.8.1) 2021-06-13 19:47:16,721: DEBUG - ERROR: No matching distribution found for torch==1.8.0+cpu

For further details see: https://paste.yunohost.org/raw/ijiduyayed

Jules-Bertholet commented 3 years ago

@mikerjensen One of the links was incorrect, should be fixed in testing. Hopefully the next attempt will succeed...

mikerjensen commented 3 years ago

@Jules-Bertholet still not quite there it seems...Not entirely sure what this error is about.

2021-06-14 10:17:20,685: DEBUG - + out='https://github-releases.githubusercontent.com/537699/da18e500-befd-11eb-8bca-7d66e741aebe?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210614%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210614T190752Z&X-Amz-Expires=300&X-Amz-Signature=98ba1527104ee44a75e016ccd4d778cd0234c439f32bcd26c48ae5901ee0dca0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=537699&response-content-disposition=attachment%3B%20filename%3Dcmake-3.20.3-linux-aarch64.tar.gz&response-content-type=application%2Foctet-stream: 2021-06-14 10:17:20,688: DEBUG - 2021-06-14 10:17:20 ERROR 403: Forbidden.

The full log here: https://paste.yunohost.org/raw/otopurobaw

Jules-Bertholet commented 3 years ago

@mikerjensen This time it seems that the problem wasn't in this Yunohost package—it was a temporary problem with one of the websites that the package downloads files from. Can you try it again?

mikerjensen commented 3 years ago

Ah yes @Jules-Bertholet, my internet link is quite slow, so the download on some of those big files aborted. Anyway, i managed to progress after some more retries. I also found compiling faiss needed more swap space as it was running out of memory on my 4GB RPI4. Then i got the below compile error i'm not sure what do do about.

BTW is it possible to display download progress? at one point it didn't seem to be progressing at all, but perhaps this is a bigger question for the yunohost install framework.

2021-06-16 00:22:09,711: DEBUG - [100%] Building CXX object faiss/CMakeFiles/faiss.dir/invlists/OnDiskInvertedLists.cpp.o 2021-06-16 00:30:55,757: WARNING - during RTL pass: expand 2021-06-16 00:30:56,038: WARNING - /opt/yunohost/librephotos/backend/faiss/faiss/impl/pq4_fast_scan_search_1.cpp: In function ‘void faiss::{anonymous}::kernel_accumulate_block(int, const uint8_t, const uint8_t, ResultHandler&) [with int NQ = 1; int BB = 1; ResultHandler = faiss::simd_result_handlers::FixedStorageHandler<1, 2>]’: 2021-06-16 00:30:56,071: WARNING - /opt/yunohost/librephotos/backend/faiss/faiss/impl/pq4_fast_scan_search_1.cpp:58:65: internal compiler error: Segmentation fault 2021-06-16 00:30:56,080: WARNING - simd32uint8 chi = simd32uint8(simd16uint16(c) >> 4) & mask;

Full log here: https://paste.yunohost.org/raw/wakapivuge

Jules-Bertholet commented 3 years ago

@mikerjensen Sometimes segfaults can be caused by OOM, are you sure you added enough swap?

mikerjensen commented 3 years ago

Ah, you could be right @Jules-Bertholet, so i increased the Swap space again, to 12GB and it segfaulted again, at the same place: https://paste.yunohost.org/raw/eroxayihag

In case it was still not enough, I increased swap to 16GB and it did the same thing: https://paste.yunohost.org/raw/ewiyudozat

I wonder how to determine if I need to increase swap still further....

Jules-Bertholet commented 3 years ago

@mikerjensen If it's the same place every time, it's likely not an OOM. I'll need to investigate more...

Jules-Bertholet commented 3 years ago

@mikerjensen Can you try the latest testing? It uses a different method for installing FAISS, hopefully it will avoid the segfault

mikerjensen commented 3 years ago
Thanks for trying a different method. I think a minor version
  error may need fixing here:
PackagesNotFoundError: The following packages are not available from current channels:

2021-06-25 07:27:12,379: DEBUG - 2021-06-25 07:27:12,381: WARNING - - faiss-cpu==1.7.0 2021-06-25 07:27:12,382: DEBUG - 2021-06-25 07:27:12,383: WARNING - Current channels: 2021-06-25 07:27:12,385: DEBUG - 2021-06-25 07:27:12,386: WARNING - - https://conda.anaconda.org/conda-forge/linux-aarch64 2021-06-25 07:27:12,387: WARNING - - https://conda.anaconda.org/conda-forge/noarch 2021-06-25 07:27:12,389: DEBUG - 2021-06-25 07:27:12,390: WARNING - To search for alternate channels that may provide the conda package you're 2021-06-25 07:27:12,391: WARNING - looking for, navigate to 2021-06-25 07:27:12,392: DEBUG - 2021-06-25 07:27:12,393: WARNING - https://anaconda.org 2021-06-25 07:27:12,395: DEBUG - 2021-06-25 07:27:12,396: WARNING - and use the search bar at the top of the page. 2021-06-25 07:27:12,397: DEBUG - 2021-06-25 07:27:12,398: DEBUG - 2021-06-25 07:27:14,954: DEBUG - + ynh_exit_properly

https://paste.yunohost.org/raw/idetapupuv

Mike

On 25/06/21 14:24, Jules Bertholet
  wrote:

  @mikerjensen
    Can you try the latest testing? It uses a
    different method for installing FAISS, hopefully it will avoid
    the segfault
  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub, or unsubscribe.
  [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/YunoHost-Apps/librephotos_ynh/issues/6#issuecomment-868497761", "url": "https://github.com/YunoHost-Apps/librephotos_ynh/issues/6#issuecomment-868497761", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]