matiasdelellis / facerecognition-external-model

Nextcloud Facerecognition External Model
11 stars 10 forks source link

Illegal instruction (core dumped) on container start #16

Open allista opened 5 months ago

allista commented 5 months ago

Which happens at line:

import dlib

Host cpuinfo (4 cores):

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 150
model name  : Intel(R) Celeron(R) J6412 @ 2.00GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 1872.062
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 27
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust smep erms rdt_a rdseed smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip waitpkg gfni rdpid movdiri movdir64b md_clear flush_l1d arch_capabilities
vmx flags   : vnmi preemption_timer posted_intr invvpid ept_x_only ept_ad flexpriority apicv tsc_offset vtpr mtf vapic ept vpid unrestricted_guest vapic_reg vid ple shadow_vmcs ept_mode_based_exec tsc_scaling usr_wait_pause
bugs        : spectre_v1 spectre_v2 spec_store_bypass swapgs srbds mmio_stale_data
bogomips    : 3993.60
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual

How to reproduce:

docker run --rm -it matiasdelellis/facerecognition-external-model:v1 /bin/bash
flask  facerecognition-external-model.py --debug
# or
python
> import dlib
nordscan commented 5 months ago

the same

allista commented 5 months ago

"Fixed" it by cloning and rebuilding the image locally without any change.

sudo docker build -t matiasdelellis/facerecognition-external-model:v1 ./

Now everything works. Even managed to replace the corresponding nextcloud-aio container with this docker-compose

version: '3.8'
services:
  nextcloud-aio-facerecognition:
    container_name: nextcloud-aio-facerecognition
    image: 'facerecognition-external-model'
    restart: unless-stopped
    networks:
      - nextcloud-aio

networks:
  nextcloud-aio:
    external: true
    name: nextcloud-aio
elephantastyczny commented 2 months ago

Another workaround for it (for VM in Proxmox) is to change cpu from currently selected to host.