Remove deprecated Compose attributes: 'extends', 'links', 'volumes_from', etc. #212

Open
opened 2026-01-20 01:12:10 +03:00 by skobkin · 1 comment
Owner

Remove deprecated Compose attributes: extends, links, volumes_from, etc.

Related to #211.

Remove deprecated Compose attributes: `extends`, `links`, `volumes_from`, etc. Related to #211.
skobkin self-assigned this 2026-01-20 01:12:10 +03:00
Author
Owner

Seems like immich and invokeai require some changes in this matter.

Example suggestion from Codex:

diff --git a/immich/docker-compose.yml b/immich/docker-compose.yml                                                                                                                                                                                                                                                                                                                                                       01:12 [33/676]
index 0000000..1111111 100644                                                                                                                                                                                     
--- a/immich/docker-compose.yml                                                   
+++ b/immich/docker-compose.yml
@@ -7,6 +7,74 @@                                                                                                                                                                                                  
#                                                         
                                                                                                        
name: immich                                                                          
+                                                  
+x-immich-hwaccel-transcoding:                                                     
+  cpu: &immich_transcoding_cpu {}                                                                                                                                                                                
+  nvenc: &immich_transcoding_nvenc
+    deploy:                                                                                                                                                                                                      
+      resources:                                             
+        reservations:
+          devices:                                     
+            - driver: nvidia
+              count: 1     
+              capabilities:
+                - gpu              
+                - compute                                                                                                                                                                                        
+                - video
+  quicksync: &immich_transcoding_quicksync
+    devices:                                                            
+      - /dev/dri:/dev/dri                              
+  rkmpp: &immich_transcoding_rkmpp
+    security_opt:                        
+      - 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
+  vaapi: &immich_transcoding_vaapi
+    devices:
+      - /dev/dri:/dev/dri
+  vaapi-wsl: &immich_transcoding_vaapi_wsl
+    devices:
+      - /dev/dri:/dev/dri
+    volumes:
+      - /usr/lib/wsl:/usr/lib/wsl
+    environment:
+      - LIBVA_DRIVER_NAME=d3d12
+
+x-immich-hwaccel-ml:
+  armnn: &immich_ml_armnn
+    devices:
+      - /dev/mali0:/dev/mali0
+    volumes:
+      - /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro
+      - /usr/lib/libmali.so:/usr/lib/libmali.so:ro
+  cpu: &immich_ml_cpu {}
+  cuda: &immich_ml_cuda
+    deploy:
+      resources:
+        reservations:
+          devices:
+            - driver: nvidia
+              count: 1
+              capabilities:
+                - gpu
+  openvino: &immich_ml_openvino
+    device_cgroup_rules:
+      - 'c 189:* rmw'
+    devices:
+      - /dev/dri:/dev/dri
+    volumes:
+      - /dev/bus/usb:/dev/bus/usb
+  openvino-wsl: &immich_ml_openvino_wsl
+    devices:
+      - /dev/dri:/dev/dri
+      - /dev/dxg:/dev/dxg
+    volumes:
+      - /dev/bus/usb:/dev/bus/usb
+      - /usr/lib/wsl:/usr/lib/wsl
+
+x-immich-db:
+  internal: &immich_db_internal {}
+  shared: &immich_db_shared
+    ports:
+      - '${DB_EXTERNAL_ADDRESS:-127.0.0.1}:${DB_EXTERNAL_PORT:-5430}:5432'

services:
    immich-server:
    container_name: immich_server
    image: 'ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}'
-    extends:
-      file: 'hwaccel.transcoding.yml'
-      service: '${HWACCEL_TRANSCODING:-cpu}' # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
+    <<: *immich_transcoding_cpu # swap to *immich_transcoding_nvenc/quicksync/...
    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:-./upload}:/usr/src/app/upload'
@@ -33,9 +101,7 @@ services:
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: 'ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}'
-    extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
-      file: 'hwaccel.ml.yml'
-      service: '${HWACCEL_ML:-cpu}' # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
+    <<: *immich_ml_cpu # swap to *immich_ml_cuda/openvino/...
    volumes:
        - '${MODEL_CACHE_LOCATION:-./model-cache}:/cache'
    env_file:
@@ -63,9 +129,7 @@ services:
    database:
    container_name: immich_postgres
    image: 'ghcr.io/immich-app/postgres:14-vectorchord0.4.3@sha256:da52bbead5d818adaa8077c8dcdaad0aaf93038c31ad8348b51f9f0ec1310a4d'
-    extends:
-      file: 'share_db.yaml'
-      service: '${DB_MODE:-internal}' # set to one of [shared, internal]
+    <<: *immich_db_internal # swap to *immich_db_shared
    environment:
        POSTGRES_PASSWORD: '${DB_PASSWORD}'
        POSTGRES_USER: '${DB_USERNAME}'
Seems like `immich` and `invokeai` require some changes in this matter. Example suggestion from Codex: ```diff diff --git a/immich/docker-compose.yml b/immich/docker-compose.yml 01:12 [33/676] index 0000000..1111111 100644 --- a/immich/docker-compose.yml +++ b/immich/docker-compose.yml @@ -7,6 +7,74 @@ # name: immich + +x-immich-hwaccel-transcoding: + cpu: &immich_transcoding_cpu {} + nvenc: &immich_transcoding_nvenc + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: + - gpu + - compute + - video + quicksync: &immich_transcoding_quicksync + devices: + - /dev/dri:/dev/dri + rkmpp: &immich_transcoding_rkmpp + security_opt: + - 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 + vaapi: &immich_transcoding_vaapi + devices: + - /dev/dri:/dev/dri + vaapi-wsl: &immich_transcoding_vaapi_wsl + devices: + - /dev/dri:/dev/dri + volumes: + - /usr/lib/wsl:/usr/lib/wsl + environment: + - LIBVA_DRIVER_NAME=d3d12 + +x-immich-hwaccel-ml: + armnn: &immich_ml_armnn + devices: + - /dev/mali0:/dev/mali0 + volumes: + - /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro + - /usr/lib/libmali.so:/usr/lib/libmali.so:ro + cpu: &immich_ml_cpu {} + cuda: &immich_ml_cuda + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: + - gpu + openvino: &immich_ml_openvino + device_cgroup_rules: + - 'c 189:* rmw' + devices: + - /dev/dri:/dev/dri + volumes: + - /dev/bus/usb:/dev/bus/usb + openvino-wsl: &immich_ml_openvino_wsl + devices: + - /dev/dri:/dev/dri + - /dev/dxg:/dev/dxg + volumes: + - /dev/bus/usb:/dev/bus/usb + - /usr/lib/wsl:/usr/lib/wsl + +x-immich-db: + internal: &immich_db_internal {} + shared: &immich_db_shared + ports: + - '${DB_EXTERNAL_ADDRESS:-127.0.0.1}:${DB_EXTERNAL_PORT:-5430}:5432' services: immich-server: container_name: immich_server image: 'ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}' - extends: - file: 'hwaccel.transcoding.yml' - service: '${HWACCEL_TRANSCODING:-cpu}' # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding + <<: *immich_transcoding_cpu # swap to *immich_transcoding_nvenc/quicksync/... 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:-./upload}:/usr/src/app/upload' @@ -33,9 +101,7 @@ services: # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: 'ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}' - extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration - file: 'hwaccel.ml.yml' - service: '${HWACCEL_ML:-cpu}' # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable + <<: *immich_ml_cpu # swap to *immich_ml_cuda/openvino/... volumes: - '${MODEL_CACHE_LOCATION:-./model-cache}:/cache' env_file: @@ -63,9 +129,7 @@ services: database: container_name: immich_postgres image: 'ghcr.io/immich-app/postgres:14-vectorchord0.4.3@sha256:da52bbead5d818adaa8077c8dcdaad0aaf93038c31ad8348b51f9f0ec1310a4d' - extends: - file: 'share_db.yaml' - service: '${DB_MODE:-internal}' # set to one of [shared, internal] + <<: *immich_db_internal # swap to *immich_db_shared environment: POSTGRES_PASSWORD: '${DB_PASSWORD}' POSTGRES_USER: '${DB_USERNAME}' ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skobkin/docker-stacks#212
No description provided.