-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ml)!: cuda and openvino acceleration (#5619)
* cuda and openvino ep, refactor, update dockerfile * updated workflow * typing fixes * added tests * updated ml test gh action * updated README * updated docker-compose * added compute to hwaccel.yml * updated gh matrix updated gh matrix updated gh matrix updated gh matrix updated gh matrix give up * remove cuda/arm64 build * add hwaccel image tags to docker-compose * remove unnecessary quotes * add suffix to git tag * fixed kwargs in base model * armnn ld_library_path * update pyproject.toml * add armnn workflow * formatting * consolidate hwaccel files, update docker compose * update hw transcoding docs * add ml hwaccel docs * update dev and prod docker-compose * added armnn prerequisite docs * support 3.10 * updated docker-compose comments * formatting * test coverage * don't set arena extend strategy for openvino * working openvino * formatting * fix dockerfile * added type annotation * add wsl configuration for openvino * updated lock file * copy python3 * comment out extends section * fix platforms * simplify workflow suffix tagging * simplify aio transcoding doc * update docs and workflow for `hwaccel.yml` change * revert docs
- Loading branch information
Showing
23 changed files
with
964 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: "3.8" | ||
|
||
# Configurations for hardware-accelerated machine learning | ||
|
||
# If using Unraid or another platform that doesn't allow multiple Compose files, | ||
# you can inline the config for a backend by copying its contents | ||
# into the immich-machine-learning service in the docker-compose.yml file. | ||
|
||
# See https://immich.app/docs/features/ml-hardware-acceleration for info on usage. | ||
|
||
services: | ||
armnn: | ||
devices: | ||
- /dev/mali0:/dev/mali0 | ||
volumes: | ||
- /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro # Mali firmware for your chipset (not always required depending on the driver) | ||
- /usr/lib/libmali.so:/usr/lib/libmali.so:ro # Mali driver for your chipset (always required) | ||
|
||
cpu: | ||
|
||
cuda: | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: 1 | ||
capabilities: | ||
- gpu | ||
- compute | ||
- video | ||
|
||
openvino: | ||
device_cgroup_rules: | ||
- "c 189:* rmw" | ||
devices: | ||
- /dev/dri:/dev/dri | ||
volumes: | ||
- /dev/bus/usb:/dev/bus/usb | ||
|
||
openvino-wsl: | ||
devices: | ||
- /dev/dri:/dev/dri | ||
- /dev/dxg:/dev/dxg | ||
volumes: | ||
- /dev/bus/usb:/dev/bus/usb | ||
- /usr/lib/wsl:/usr/lib/wsl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
version: "3.8" | ||
|
||
# Configurations for hardware-accelerated transcoding | ||
|
||
# If using Unraid or another platform that doesn't allow multiple Compose files, | ||
# you can inline the config for a backend by copying its contents | ||
# into the immich-microservices service in the docker-compose.yml file. | ||
|
||
# See https://immich.app/docs/features/hardware-transcoding for more info on using hardware transcoding. | ||
|
||
services: | ||
cpu: | ||
|
||
nvenc: | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: 1 | ||
capabilities: | ||
- gpu | ||
- compute | ||
- video | ||
|
||
quicksync: | ||
devices: | ||
- /dev/dri:/dev/dri | ||
|
||
rkmpp: | ||
security_opt: # enables full access to /sys and /proc, still far better than privileged: true | ||
- systempaths=unconfined | ||
- apparmor=unconfined | ||
group_add: | ||
- video | ||
devices: | ||
- /dev/rga:/dev/rga | ||
- /dev/dri:/dev/dri | ||
- /dev/dma_heap:/dev/dma_heap | ||
- /dev/mpp_service:/dev/mpp_service | ||
volumes: | ||
- /usr/bin/ffmpeg:/usr/bin/ffmpeg_mpp:ro | ||
- /lib/aarch64-linux-gnu:/lib/ffmpeg-mpp:ro | ||
- /lib/aarch64-linux-gnu/libblas.so.3:/lib/ffmpeg-mpp/libblas.so.3:ro # symlink is resolved by mounting | ||
- /lib/aarch64-linux-gnu/liblapack.so.3:/lib/ffmpeg-mpp/liblapack.so.3:ro # symlink is resolved by mounting | ||
- /lib/aarch64-linux-gnu/pulseaudio/libpulsecommon-15.99.so:/lib/ffmpeg-mpp/libpulsecommon-15.99.so:ro | ||
|
||
vaapi: | ||
devices: | ||
- /dev/dri:/dev/dri | ||
|
||
vaapi-wsl: # use this for VAAPI if you're running Immich in WSL2 | ||
devices: | ||
- /dev/dri:/dev/dri | ||
volumes: | ||
- /usr/lib/wsl:/usr/lib/wsl | ||
environment: | ||
- LD_LIBRARY_PATH=/usr/lib/wsl/lib | ||
- LIBVA_DRIVER_NAME=d3d12 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.