exadel-inc / CompreFace

Leading free and open-source face recognition system
https://exadel.com/accelerator-showcase/compreface/
Apache License 2.0
5.27k stars 723 forks source link

Possible used CompareFace docker on Raspberry PI ? #610

Closed antonbek89 closed 1 year ago

antonbek89 commented 2 years ago

The linux version Linux raspberrypi 5.10.60-v8+ #1449 SMP PREEMPT Wed Aug 25 15:01:33 BST 2021 aarch64 GNU/Linux

pi@raspberrypi:~ $ sudo docker-compose up
Starting compreface-postgres-db ... done
Starting compreface-core        ... done
Starting compreface-api         ... done
Starting compreface-admin       ... done
Starting compreface-ui          ... done
Attaching to compreface-postgres-db, compreface-core, compreface-api, compreface-admin, compreface-ui
compreface-api            | standard_init_linux.go:228: exec user process caused: exec format error
compreface-core           | standard_init_linux.go:228: exec user process caused: exec format error
compreface-admin          | standard_init_linux.go:228: exec user process caused: exec format error
compreface-api exited with code 1
compreface-postgres-db    | 2021-10-01 01:09:45.036 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
compreface-postgres-db    | 2021-10-01 01:09:45.037 UTC [1] LOG:  listening on IPv6 address "::", port 5432
compreface-postgres-db    | 2021-10-01 01:09:45.103 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
compreface-postgres-db    | 2021-10-01 01:09:45.297 UTC [25] LOG:  database system was shut down at 2021-10-01 00:50:59 UTC
compreface-core exited with code 1
compreface-ui             | standard_init_linux.go:228: exec user process caused: exec format error
compreface-postgres-db    | 2021-10-01 01:09:45.600 UTC [1] LOG:  database system is ready to accept connections
compreface-admin exited with code 1
compreface-ui exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Stopping compreface-postgres-db ...
^C^CERROR: Aborting.
pospielov commented 2 years ago

Hi, unfortunately not yet, I described all the problems here: https://github.com/exadel-inc/CompreFace/issues/519#issuecomment-848057021

Nigma1337 commented 2 years ago

Also, another problem would be that the raspberry pi's dont have AVX support, atleast not mine.

pospielov commented 2 years ago

Any ARM device supports the AVX, but it's not a problem. If we take precompiled Tensorflow for ARM, it won't require AVX.

Nigma1337 commented 2 years ago

Any ARM device supports the AVX, but it's not a problem. If we take precompiled Tensorflow for ARM, it won't require AVX.

well this guy asked about the raspberry pi, which has a cpu without AVX support out of the box.

pospielov commented 2 years ago

Raspberry pi has an ARM CPU, this is why I mentioned it. As soon as we build CompreFace for ARM, it should start working on all ARM devices, including Raspberry pi

antonbek89 commented 2 years ago

@pospielov Any updates with ARM version?

pospielov commented 2 years ago

Unfortunately no, I can't find a contributor for this, and I don't have time either

LordNex commented 2 years ago

Unfortunately no, I can't find a contributor for this, and I don't have time either

What do you need?

I have a Jetson Nano 4gig I'd like to use this on. It was running DeepStack but even with CUDA support it does do near what the version of CompreFace I have installed in Home Assistant using just lots of CPU (40 core PowerEdge R620 running VMWare)

pospielov commented 2 years ago

The biggest problem with running CompreFace on an ARM is that it uses libraries not compiled for ARM devices. For example, Tensorflow. When I last checked, Pillow wasn't supported as, well. But it looks like it supports now. So we need somebody who checks all the dependencies if they are supported by ARM. Then fix somehow all dependencies that don't support ARM. Make a new dockerfile (or update the old one) and finally, use Docker Buildx to set up CompreFace build for ARM devices.

LordNex commented 1 year ago

The biggest problem with running CompreFace on an ARM is that it uses libraries not compiled for ARM devices.

For example, Tensorflow. When I last checked, Pillow wasn't supported as, well. But it looks like it supports now.

So we need somebody who checks all the dependencies if they are supported by ARM.

Then fix somehow all dependencies that don't support ARM.

Make a new dockerfile (or update the old one)

and finally, use Docker Buildx to set up CompreFace build for ARM devices.

I have all the hardware. But don't know enough programming to do all of that. Although I'm no slouch at the cli and I'm not afraid to experiment. You'd have to walk me through it step by step.

pospielov commented 1 year ago

@LordNex Could you test this build on your ARM device? https://github.com/exadel-inc/CompreFace/pull/1018

LordNex commented 1 year ago

@LordNex Could you test this build on your ARM device?

https://github.com/exadel-inc/CompreFace/pull/1018

Yea it'll take me a bit. I've got to take the case apart to get the SD card out so I can load it back up. But yea I'll get it tested as soon as I can.

pierluigizagaria commented 1 year ago

What are the performance? Raspberry Pi 4 4gb is enough?

rajdey1 commented 2 weeks ago

I’m currently running Compreface on a system with an AArch64 (ARM 64-bit) architecture and encountered compatibility issues with some services. Specifically, I am having trouble running the compreface-core service on this architecture.

I’ve successfully managed to run other containers on my AArch64 setup by using multi-platform support via docker buildx, but I am unsure if compreface-core is compatible or if there are any known issues or requirements for running it on ARM-based systems.

Could you please provide information on the following:

AArch64 Support: Does Compreface officially support ARM 64-bit architecture? Are there specific steps or configurations required to run compreface-core on an AArch64 system?

Docker Images: Are there pre-built Docker images for ARM 64-bit architecture for Compreface services? If not, are there recommended practices or solutions for building these images from source?

Known Issues: Are there any known issues or limitations when running Compreface services on ARM-based systems?

Documentation: Is there any additional documentation or community resources for running Compreface on non-x86 architectures?

Any guidance or assistance would be greatly appreciated as it will help in ensuring compatibility and smooth operation of Compreface on ARM-based systems.

Thank you for your time and support!