chore: Update docker-compose.yml for accelerated transcoding using vaapi

This commit is contained in:
2024-09-06 12:49:26 +02:00
parent 4c4d0e0563
commit 29496bdebc
3 changed files with 55 additions and 29 deletions

25
.env Normal file
View File

@@ -0,0 +1,25 @@
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/pictures/immich
# The location where your database files are stored
DB_DATA_LOCATION=postgres
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=v1.113.1
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=BQhp5h8TifAsBfjJ37QH3mgv8uKTeDSiuKKtVYdMk
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
TYPESENSE_API_KEY=some-random-text
TZ=Europe/Brussels

View File

@@ -12,9 +12,9 @@ services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
extends:
file: hwaccel.transcoding.yml
service: vaapi # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
@@ -74,3 +74,4 @@ services:
volumes:
model-cache:
postgres:

View File

@@ -25,31 +25,31 @@ services:
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
#- /dev/mali0:/dev/mali0 # only required to enable OpenCL-accelerated HDR -> SDR tonemapping
volumes:
#- /etc/OpenCL:/etc/OpenCL:ro # only required to enable OpenCL-accelerated HDR -> SDR tonemapping
#- /usr/lib/aarch64-linux-gnu/libmali.so.1:/usr/lib/aarch64-linux-gnu/libmali.so.1:ro # only required to enable OpenCL-accelerated HDR -> SDR tonemapping
# 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
# #- /dev/mali0:/dev/mali0 # only required to enable OpenCL-accelerated HDR -> SDR tonemapping
# volumes:
# #- /etc/OpenCL:/etc/OpenCL:ro # only required to enable OpenCL-accelerated HDR -> SDR tonemapping
# #- /usr/lib/aarch64-linux-gnu/libmali.so.1:/usr/lib/aarch64-linux-gnu/libmali.so.1:ro # only required to enable OpenCL-accelerated HDR -> SDR tonemapping
vaapi:
devices:
- /dev/dri:/dev/dri
# 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
# 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