[BUG] unable to run immich-machine-learning #217

Closed
opened 2026-02-04 18:47:54 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @martinjuhasz on GitHub (Aug 21, 2022).

Describe the bug
I'm trying to run the altran1502/immich-machine-learning container without using the docker-compose file (i'm using unraid, so thats the way to go there). All other containers run fine and the app itself works without any problems. But the machine-learning container shuts itself down seconds after start.

The log output:

> nest_microservices@0.0.1 prebuild
> rimraf dist


> nest_microservices@0.0.1 build
> nest build


> nest_microservices@0.0.1 start:prod
> node dist/main

Illegal instruction

Thats it. Env vars are the same as on the other docker containers which work fine, so i don't think thats a misconfiguration on that end. Database is running, upload directory volume linked and entrypoint set.

To Reproduce
What unraid in the end runs is the following docker run command:

docker run -d --name='immich-machine-learning' --net='apps' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Winston" -e HOST_CONTAINERNAME="immich-machine-learning" -e 'DB_HOSTNAME'='postgres' -e 'DB_USERNAME'='postgres' -e 'DB_PASSWORD'='abc' -e 'DB_DATABASE_NAME'='immich' -e 'DB_PORT'='5432' -e 'REDIS_HOSTNAME'='redis' -e 'JWT_SECRET'='abc' -e 'ENABLE_MAPBOX'='false' -e 'NODE_ENV'='production' -l net.unraid.docker.managed=dockerman -v '/mnt/user/appdata/immich/upload':'/usr/src/app/upload':'rw' --entrypoint /bin/sh 'altran1502/immich-machine-learning:release' ./entrypoint.sh

System

  • Server Version: Unraid OS 6.10.3

How could i debug this further? Not sure what hint to look out for

// Edit found another line in the logs:
Illegal instruction

Originally created by @martinjuhasz on GitHub (Aug 21, 2022). <!-- Note: Please search to see if an issue already exists for the bug you encountered. --> **Describe the bug** I'm trying to run the `altran1502/immich-machine-learning` container without using the docker-compose file (i'm using unraid, so thats the way to go there). All other containers run fine and the app itself works without any problems. But the machine-learning container shuts itself down seconds after start. The log output: ``` > nest_microservices@0.0.1 prebuild > rimraf dist > nest_microservices@0.0.1 build > nest build > nest_microservices@0.0.1 start:prod > node dist/main Illegal instruction ``` Thats it. Env vars are the same as on the other docker containers which work fine, so i don't think thats a misconfiguration on that end. Database is running, upload directory volume linked and entrypoint set. **To Reproduce** What unraid in the end runs is the following docker run command: ``` docker run -d --name='immich-machine-learning' --net='apps' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Winston" -e HOST_CONTAINERNAME="immich-machine-learning" -e 'DB_HOSTNAME'='postgres' -e 'DB_USERNAME'='postgres' -e 'DB_PASSWORD'='abc' -e 'DB_DATABASE_NAME'='immich' -e 'DB_PORT'='5432' -e 'REDIS_HOSTNAME'='redis' -e 'JWT_SECRET'='abc' -e 'ENABLE_MAPBOX'='false' -e 'NODE_ENV'='production' -l net.unraid.docker.managed=dockerman -v '/mnt/user/appdata/immich/upload':'/usr/src/app/upload':'rw' --entrypoint /bin/sh 'altran1502/immich-machine-learning:release' ./entrypoint.sh ``` **System** - Server Version: Unraid OS 6.10.3 How could i debug this further? Not sure what hint to look out for // Edit found another line in the logs: `Illegal instruction`
Author
Owner

@bo0tzz commented on GitHub (Aug 21, 2022):

What sort of hardware are you on? Specifically, I believe it's necessary for your CPU to have AVX/AVX2 support.

@bo0tzz commented on GitHub (Aug 21, 2022): What sort of hardware are you on? Specifically, I believe it's necessary for your CPU to have AVX/AVX2 support.
Author
Owner

@martinjuhasz commented on GitHub (Aug 21, 2022):

Supermicro X8DT3
2x Intel® Xeon® CPU X5675 @ 3.07GHz
32 GiB DDR3 Multi-bit ECC 

ah bummer, that could be the case ofc. Will this be a problem if that service is not running? What features will i be missing out? (I guess some sort of image object search?)

// Edit: Yep, no AVX instructions on that xeon

@martinjuhasz commented on GitHub (Aug 21, 2022): ``` Supermicro X8DT3 2x Intel® Xeon® CPU X5675 @ 3.07GHz 32 GiB DDR3 Multi-bit ECC ``` ah bummer, that could be the case ofc. Will this be a problem if that service is not running? What features will i be missing out? (I guess some sort of image object search?) // Edit: Yep, no AVX instructions on that xeon
Author
Owner

@martinjuhasz commented on GitHub (Aug 21, 2022):

OK thanks for the help. So it seems there is no way around it since tensorflow is prebuilt with avx instrucitons on pip. will not go through the hussle of building it on my own and then somehow use that inside the immich container.

If anyone has another suggestion to achieve this easily, LMK please :)

@martinjuhasz commented on GitHub (Aug 21, 2022): OK thanks for the help. So it seems there is no way around it since tensorflow is prebuilt with avx instrucitons on pip. will not go through the hussle of building it on my own and then somehow use that inside the immich container. If anyone has another suggestion to achieve this easily, LMK please :)
Author
Owner

@bo0tzz commented on GitHub (Aug 21, 2022):

Without the ml container you will not have object recognition inside Immich. Everything else should still work fine. You could dive into building tensorflow yourself (some instructions at https://github.com/immich-app/immich/discussions/300), or if you have another machine with AVX support you could run the ml container on there and just point it at the same redis and postgres as the rest of the containers - I believe that should work.

@bo0tzz commented on GitHub (Aug 21, 2022): Without the ml container you will not have object recognition inside Immich. Everything else should still work fine. You could dive into building tensorflow yourself (some instructions at https://github.com/immich-app/immich/discussions/300), or if you have another machine with AVX support you could run the ml container on there and just point it at the same redis and postgres as the rest of the containers - I believe that should work.
Author
Owner

@martinjuhasz commented on GitHub (Aug 21, 2022):

cool, thanks for the link. might give this a shot

@martinjuhasz commented on GitHub (Aug 21, 2022): cool, thanks for the link. might give this a shot
Author
Owner

@PaulWoitaschek commented on GitHub (Oct 30, 2022):

What about immich doing what photoprism does:
https://github.com/photoprism/photoprism/issues/289

And shipping a custom build of tensorflow?

I assume this is hitting quite a lot of people as stuff like cheap thin clients are quite common in the self hosted world.

@PaulWoitaschek commented on GitHub (Oct 30, 2022): What about immich doing what photoprism does: https://github.com/photoprism/photoprism/issues/289 And shipping a custom build of tensorflow? I assume this is hitting quite a lot of people as stuff like cheap thin clients are quite common in the self hosted world.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#217