Replies: 2 comments 1 reply
-
I'm trying to run Immich Machine Learning in Portainer with ARM NN acceleration on my Orange Pi 5, but every time I start the container, it defaults to CPUExecutionProvider instead of ARM NN, even though all drivers and dependencies are present. version: "3.8"
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- /etc/OpenCL:/etc/OpenCL:ro
- /usr/lib/aarch64-linux-gnu/libmali.so.1:/usr/lib/aarch64-linux-gnu/libmali.so.1:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
security_opt:
- systempaths=unconfined
- apparmor=unconfined
group_add:
- video
devices:
- /dev/rga:/dev/rga
- /dev/dri:/dev/dri
- /dev/mali0:/dev/mali0
- /dev/dma_heap:/dev/dma_heap
- /dev/mpp_service:/dev/mpp_service
#- /dev/video-dec0:/dev/video-dec0 # Decoder
#- /dev/video-enc0:/dev/video-enc0 # Encoder
environment:
- HWACCEL_RKMPP=true
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-armnn
deploy:
devices:
# Enable ARM NN (AI Inference Acceleration)
- /dev/mali0:/dev/mali0
volumes:
- model-cache:/cache
- /usr/lib/aarch64-linux-gnu/libmali.so:/usr/lib/libmali.so:ro
- /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro
env_file:
- stack.env
environment:
- HWACCEL_ARMNN=true
- MACHINE_LEARNING_ANN=true
restart: always
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
restart: always
database:
container_name: immich_postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
model-cache: Log of container ` ` |
Beta Was this translation helpful? Give feedback.
-
looks like image missing dependencies which required for machine learning use armnn and its pick cpu since of that i fixed it with adding commands which install dependencies in entrypoint version: "3.8"
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- /etc/OpenCL:/etc/OpenCL:ro
- /usr/lib/aarch64-linux-gnu/libmali.so.1:/usr/lib/aarch64-linux-gnu/libmali.so.1:ro
env_file:
- stack.env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
security_opt:
- systempaths=unconfined
- apparmor=unconfined
group_add:
- video
devices:
- /dev/rga:/dev/rga
- /dev/dri:/dev/dri
- /dev/mali0:/dev/mali0
- /dev/dma_heap:/dev/dma_heap
- /dev/mpp_service:/dev/mpp_service
#- /dev/video-dec0:/dev/video-dec0 # Decoder
#- /dev/video-enc0:/dev/video-enc0 # Encoder
environment:
- HWACCEL_RKMPP=true
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-armnn
# Override the entrypoint so we can run apt-get, then start Immich ML
entrypoint: >
sh -c "apt-get update && \
apt-get install -y libx11-6 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxext6 libxcb1 && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
exec /usr/src/app/start.sh"
deploy:
devices:
# Enable ARM NN (AI Inference Acceleration)
- /dev/mali0:/dev/mali0
volumes:
- model-cache:/cache
- /usr/lib/aarch64-linux-gnu/libmali.so:/usr/lib/libmali.so:ro
- /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro
env_file:
- stack.env
environment:
- HWACCEL_ARMNN=true
- MACHINE_LEARNING_ANN=true
- MACHINE_LEARNING_ANN_FP16_TURBO=true
restart: always
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
restart: always
database:
container_name: immich_postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
model-cache: so now i get in logs model load
but looks like its working fine only for visual models and only for ViT-B-32__openai - looks like no compatible model for textual searches, if i try run text search i getting next errors- not sure how to fix it- looks like we need model for arm
|
Beta Was this translation helpful? Give feedback.
-
The bug
I have configured the docker-compose.yml and hwaccel.ml.yml like in the wiki, and check if exists /dev/mali0, /usr/lib/libmali.so and /lib/firmware/mali_csffw.bin. I have also installed https://github.com/tsukumijima/libmali-rockchip/releases/download/v1.9-1-3238416/libmali-valhall-g610-g13p0-gbm_1.9-1_arm64.deb and check with clinfo if it works. But the HW acceleration does not work.
The OS that Immich Server is running on
Armbian 24.11.1 jammy aarch64
Version of Immich Server
v1.126.1
Version of Immich Mobile App
v1.126.1
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Relevant log output
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions