robertknight/ocrs

Illegal instruction (virtualized CPU under Proxmox 8)

dawidthegreat opened this issue · 5 comments

Downloading https://ocrs-models.s3-accelerate.amazonaws.com/text-detection.rten...
Downloading https://ocrs-models.s3-accelerate.amazonaws.com/text-recognition.rten...
Illegal instruction

Running a jpg and get illegal instruction with the two files above. Have tried on more than one OC/Machine.

What operating system and version are you using, and what CPU(s) do the machines have? I'm aware of a reported issue when running older versions of the library under Rosetta emulation on Apple Silicon. See robertknight/rten#35. The workaround for the moment is to compile natively for Arm.

The OS's have been:

Ubuntu 24.04
Ubuntu 22.04
Centos 7

CPU's are virtualised on Proxmox 8. I'll try on a bare metal machine and see if I still get the error.

It was fixed by changing the cpu type to host on proxmox virtualisation. It is based on qemu so should be applicable on machines using that. Result is perfect, the text recognition is superb.

Thanks for the info. Ocrs uses AVX-2 / FMA instructions if available on x64 CPUs, so there might be an issue with misdetecting whether they are available in this virtualized environment.

Possibly, it was on the default CPU which is X86-64-V2-AES, a virtualised CPU. By selecting host from the menu solved the issue I guess by pass through functionality.