-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.yml
More file actions
1461 lines (1226 loc) · 76.8 KB
/
Copy pathmain.yml
File metadata and controls
1461 lines (1226 loc) · 76.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SPDX-FileCopyrightText: 2023 - 2024 Nikita Chernyi
# SPDX-FileCopyrightText: 2023 - 2025 MASH project contributors
# SPDX-FileCopyrightText: 2023 - 2025 Slavi Pantaleev
# SPDX-FileCopyrightText: 2025 Suguru Hirahara
# SPDX-FileCopyrightText: 2025 IUCCA
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
# Project source code URL: https://github.com/immich-app/immich
########################################################################
# #
# common #
# #
########################################################################
immich_enabled: true
immich_identifier: immich
immich_base_path: "/{{ immich_identifier }}"
# renovate: datasource=docker depName=ghcr.io/immich-app/immich-server versioning=semver
immich_version: v3.1.0
immich_uid: ""
immich_gid: ""
# The scheme used for serving Immich.
immich_scheme: https
# The hostname at which Immich is served.
immich_hostname: ""
# The path at which Immich is served.
# This value must either be `/` or not end with a slash (e.g. `/immich`).
#
# Hosting Immich under a subpath does not seem to be possible due to Immich's technical limitations.
# Ref:
# - https://github.com/immich-app/immich/issues/14530
# - https://github.com/immich-app/immich/discussions/1679
immich_path_prefix: /
immich_database_hostname: ""
immich_database_port: 5432
immich_database_username: immich
immich_database_password: ""
# Specify SSL mode for Postgres database server
# By default, we expect a local container (without SSL), so attempting SSL connections is not necessary.
# Valid values: see https://www.postgresql.org/docs/11/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS
immich_database_sslmode: disable
immich_database_name: immich
immich_redis_url: ""
immich_redis_socket: ""
immich_redis_hostname: ""
immich_redis_port: '6379'
immich_redis_username: ""
immich_redis_password: ""
immich_redis_dbindex: '0'
# The hostname of the mailer host to use for sending emails.
# This variable is not used directly in this role, but helps playbooks
# configure related services (e.g. exim-relay) based on its value.
immich_smtp_host: ""
########################################################################
# #
# /common #
# #
########################################################################
########################################################################
# #
# server #
# #
########################################################################
immich_server_enabled: true
immich_server_identifier: "{{ immich_identifier }}-server"
immich_server_base_path: "{{ immich_base_path }}/server"
immich_server_data_path: "{{ immich_server_base_path }}/data"
immich_server_version: "{{ immich_version }}"
immich_server_scheme: "{{ immich_scheme }}"
immich_server_hostname: "{{ immich_hostname }}"
immich_server_path_prefix: "{{ immich_path_prefix }}"
# The HTTP port used internally (in the container) by the server component
immich_server_http_port: 2283
# Controls how to configure the server container for hardware acceleration for transcoding.
#
# One of: cpu, nvenc, quicksync, rkmpp, vaapi, vaapi-wsl
# Ref:
# - https://immich.app/docs/features/hardware-transcoding
# - https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml
# - https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/docker-compose.yml
immich_server_transcoding_hardware_acceleration: cpu
immich_server_container_image: "{{ immich_server_container_image_registry_prefix }}immich-app/immich-server:{{ immich_server_container_image_tag }}"
immich_server_container_image_tag: "{{ immich_server_version }}"
immich_server_container_image_registry_prefix: "{{ immich_server_container_image_registry_prefix_upstream }}"
immich_server_container_image_registry_prefix_upstream: "{{ immich_server_container_image_registry_prefix_upstream_default }}"
immich_server_container_image_registry_prefix_upstream_default: ghcr.io/
# Controls the user that the server container runs as. Set to `0` to run as root.
immich_server_container_uid: "{{ immich_uid }}"
# Controls the group that the server container runs as. Set to `0` to run as root.
immich_server_container_gid: "{{ immich_gid }}"
# Controls whether the server container drops all capabilities (`--cap-drop=ALL`).
immich_server_container_cap_drop_all_enabled: true
# Controls whether the machine-learning container adds some capabilities (`--cap-add`).
# See: immich_machine_learning_container_cap_add_capabilities
immich_server_container_cap_add_enabled: "{{ immich_server_container_cap_drop_all_enabled }}"
immich_server_container_cap_add_capabilities: "{{ (immich_server_container_cap_add_capabilities_default + immich_server_container_cap_add_capabilities_auto + immich_server_container_cap_add_capabilities_custom) | unique }}"
immich_server_container_cap_add_capabilities_default: []
immich_server_container_cap_add_capabilities_auto: []
immich_server_container_cap_add_capabilities_custom: []
# Controls whether the server container runs with a read-only filesystem (`--read-only`).
immich_server_container_read_only_enabled: true
# The base container network for the server service. It will be auto-created by this role if it doesn't exist already.
immich_server_container_network: "{{ immich_identifier }}"
# A list of additional container networks that the server container would be connected to.
# The role does not create these networks, so make sure they already exist.
# Use this to expose this container to another reverse proxy, which runs in a different container network.
immich_server_container_additional_networks: "{{ (immich_server_container_additional_networks_default + immich_server_container_additional_networks_auto + immich_server_container_additional_networks_custom) | unique }}"
immich_server_container_additional_networks_default: |-
{{
(
[immich_machine_learning_container_network]
if immich_machine_learning_container_network != immich_server_container_network
else []
)
}}
immich_server_container_additional_networks_auto: []
immich_server_container_additional_networks_custom: []
# A list of additional "links" to attach to the container.
# Contains definition objects like this: `"other-container-name:alias-inside-the-container"`.
# See the `--link` documentation for the `docker run` command.
immich_server_container_links: "{{ immich_server_container_links_default + immich_server_container_links_auto + immich_server_container_links_custom }}"
immich_server_container_links_default: |-
{{
[immich_machine_learning_identifier + ":immich-machine-learning"] if immich_machine_learning_enabled | bool else []
}}
immich_server_container_links_auto: []
immich_server_container_links_custom: []
# Specify how the container publishes its HTTP port (as defined by `immich_server_http_port`).
#
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:2586"), or empty string to not expose.
# See immich_server_http_port
immich_server_container_http_host_bind_port: ""
# A list of additional "volumes" to mount in the container.
# This list gets populated dynamically at runtime. You can provide a different default value,
# if you wish to mount your own files into the container.
# Contains definition objects like this: `{"type": "bind", "src": "/outside", "dst": "/inside", "options": "readonly"}.
# See the `--mount` documentation for the `docker run` command.
immich_server_container_additional_volumes: "{{ immich_server_container_additional_volumes_default + immich_server_container_additional_volumes_auto + immich_server_container_additional_volumes_custom }}"
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml
immich_server_container_additional_volumes_default: |-
{{
{
'cpu': immich_server_container_additional_volumes_default_cpu,
'nvenc': immich_server_container_additional_volumes_default_nvenc,
'quicksync': immich_server_container_additional_volumes_default_quicksync,
'rkmpp': immich_server_container_additional_volumes_default_rkmpp,
'vaapi': immich_server_container_additional_volumes_default_vaapi,
'vaapi-wsl': immich_server_container_additional_volumes_default_vaapi_wsl,
}[immich_server_transcoding_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L10
immich_server_container_additional_volumes_default_cpu: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L12
immich_server_container_additional_volumes_default_nvenc: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L24
immich_server_container_additional_volumes_default_quicksync: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L40-L42
immich_server_container_additional_volumes_default_rkmpp: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L44
immich_server_container_additional_volumes_default_vaapi: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L52-L53
immich_server_container_additional_volumes_default_vaapi_wsl: |-
{{
(
[
{
'type': 'bind',
'src': immich_server_container_additional_volumes_default_vaapi_wsl_usr_lib_wsl_path,
'dst': immich_server_container_additional_volumes_default_vaapi_wsl_usr_lib_wsl_path,
'options': ""
}
]
if immich_server_container_additional_volumes_default_vaapi_wsl_usr_lib_wsl_enabled
else []
)
}}
immich_server_container_additional_volumes_default_vaapi_wsl_usr_lib_wsl_enabled: true
immich_server_container_additional_volumes_default_vaapi_wsl_usr_lib_wsl_path: /usr/lib/wsl
immich_server_container_additional_volumes_auto: []
immich_server_container_additional_volumes_custom: []
# A list of additional "devices" to attach to the container.
# Contains definition objects like this: `{"src": "/dev/mali0", "dst": "/dev/mali0", "options": "rwm"}`.
# See the `--device` documentation for the `docker run` command.
immich_server_container_devices: "{{ immich_server_container_devices_default + immich_server_container_devices_auto + immich_server_container_devices_custom }}"
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml
immich_server_container_devices_default: |-
{{
{
'cpu': immich_server_container_devices_default_cpu,
'nvenc': immich_server_container_devices_default_nvenc,
'quicksync': immich_server_container_devices_default_quicksync,
'rkmpp': immich_server_container_devices_default_rkmpp,
'vaapi': immich_server_container_devices_default_vaapi,
'vaapi-wsl': immich_server_container_devices_default_vaapi_wsl,
}[immich_server_transcoding_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L10
immich_server_container_devices_default_cpu: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L12
immich_server_container_devices_default_nvenc: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L25-L26
immich_server_container_devices_default_quicksync: |-
{{
(
[
{
'src': immich_server_container_devices_default_quicksync_dri_path,
'dst': immich_server_container_devices_default_quicksync_dri_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_quicksync_dri_enabled
else []
)
}}
immich_server_container_devices_default_quicksync_dri_enabled: true
immich_server_container_devices_default_quicksync_dri_path: /dev/dri
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L34-L39
immich_server_container_devices_default_rkmpp: |-
{{
(
[
{
'src': immich_server_container_devices_default_rkmpp_rga_path,
'dst': immich_server_container_devices_default_rkmpp_rga_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_rkmpp_rga_enabled
else []
)
+
(
[
{
'src': immich_server_container_devices_default_rkmpp_dri_path,
'dst': immich_server_container_devices_default_rkmpp_dri_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_rkmpp_dri_enabled
else []
)
+
(
[
{
'src': immich_server_container_devices_default_rkmpp_dma_heap_path,
'dst': immich_server_container_devices_default_rkmpp_dma_heap_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_rkmpp_dma_heap_enabled
else []
)
+
(
[
{
'src': immich_server_container_devices_default_rkmpp_mpp_service_path,
'dst': immich_server_container_devices_default_rkmpp_mpp_service_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_rkmpp_mpp_service_enabled
else []
)
}}
immich_server_container_devices_default_rkmpp_rga_enabled: true
immich_server_container_devices_default_rkmpp_rga_path: /dev/rga
immich_server_container_devices_default_rkmpp_dri_enabled: true
immich_server_container_devices_default_rkmpp_dri_path: /dev/dri
immich_server_container_devices_default_rkmpp_dma_heap_enabled: true
immich_server_container_devices_default_rkmpp_dma_heap_path: /dev/dma_heap
immich_server_container_devices_default_rkmpp_mpp_service_enabled: true
immich_server_container_devices_default_rkmpp_mpp_service_path: /dev/mpp_service
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L45-L46
immich_server_container_devices_default_vaapi: |-
{{
(
[
{
'src': immich_server_container_devices_default_vaapi_dri_path,
'dst': immich_server_container_devices_default_vaapi_dri_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_vaapi_dri_enabled
else []
)
}}
immich_server_container_devices_default_vaapi_dri_enabled: true
immich_server_container_devices_default_vaapi_dri_path: /dev/dri
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L49-L51
immich_server_container_devices_default_vaapi_wsl: |-
{{
(
[
{
'src': immich_server_container_devices_default_vaapi_wsl_dri_path,
'dst': immich_server_container_devices_default_vaapi_wsl_dri_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_vaapi_wsl_dri_enabled
else []
)
+
(
[
{
'src': immich_server_container_devices_default_vaapi_wsl_dxg_path,
'dst': immich_server_container_devices_default_vaapi_wsl_dxg_path,
'options': 'rwm'
}
]
if immich_server_container_devices_default_vaapi_wsl_dxg_enabled
else []
)
}}
immich_server_container_devices_default_vaapi_wsl_dri_enabled: true
immich_server_container_devices_default_vaapi_wsl_dri_path: /dev/dri
immich_server_container_devices_default_vaapi_wsl_dxg_enabled: true
immich_server_container_devices_default_vaapi_wsl_dxg_path: /dev/dxg
immich_server_container_devices_auto: []
immich_server_container_devices_custom: []
# A list of additional "device cgroup rules" to attach to the container.
# Contains strings like this: `"c 42:* rmw"`.
# See the `--device-cgroup-rule` documentation for the `docker run` command.
immich_server_container_device_cgroup_rules: "{{ immich_server_container_device_cgroup_rules_default + immich_server_container_device_cgroup_rules_auto + immich_server_container_device_cgroup_rules_custom }}"
immich_server_container_device_cgroup_rules_default: []
immich_server_container_device_cgroup_rules_auto: []
immich_server_container_device_cgroup_rules_custom: []
# A list of GPUs to pass to the container.
# Contains strings like this: `"device=0"` or `"all"`.
# See the `--gpus` documentation for the `docker run` command.
immich_server_container_gpus: "{{ (immich_server_container_gpus_default + immich_server_container_gpus_auto + immich_server_container_gpus_custom) | unique }}"
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml
immich_server_container_gpus_default: |-
{{
{
'cpu': immich_server_container_gpus_default_cpu,
'nvenc': immich_server_container_gpus_default_nvenc,
'quicksync': immich_server_container_gpus_default_quicksync,
'rkmpp': immich_server_container_gpus_default_rkmpp,
'vaapi': immich_server_container_gpus_default_vaapi,
'vaapi-wsl': immich_server_container_gpus_default_vaapi_wsl,
}[immich_server_transcoding_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L10
immich_server_container_gpus_default_cpu: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L12-L22
immich_server_container_gpus_default_nvenc: ["device=0"]
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L24
immich_server_container_gpus_default_quicksync: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L28
immich_server_container_gpus_default_rkmpp: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L44
immich_server_container_gpus_default_vaapi: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L48
immich_server_container_gpus_default_vaapi_wsl: []
immich_server_container_gpus_auto: []
immich_server_container_gpus_custom: []
# A list of security options (`--security-opt`) to pass to the container.
# Contains strings like this: `"label=user:1000"`.
# See the `--security-opt` documentation for the `docker run` command.
immich_server_container_security_opt: "{{ immich_server_container_security_opt_default + immich_server_container_security_opt_auto + immich_server_container_security_opt_custom }}"
# Ref: https://github.com/immich-app/immich/blob/main/docker/hwaccel.transcoding.yml#L48
immich_server_container_security_opt_default: |-
{{
{
'cpu': immich_server_container_security_opt_default_cpu,
'nvenc': immich_server_container_security_opt_default_nvenc,
'quicksync': immich_server_container_security_opt_default_quicksync,
'rkmpp': immich_server_container_security_opt_default_rkmpp,
'vaapi': immich_server_container_security_opt_default_vaapi,
'vaapi-wsl': immich_server_container_security_opt_default_vaapi_wsl,
}[immich_server_transcoding_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L10
immich_server_container_security_opt_default_cpu: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L12
immich_server_container_security_opt_default_nvenc: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L24
immich_server_container_security_opt_default_quicksync: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L29-L31
immich_server_container_security_opt_default_rkmpp:
- "systempaths=unconfined"
- "apparmor=unconfined"
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L44
immich_server_container_security_opt_default_vaapi: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L48
immich_server_container_security_opt_default_vaapi_wsl: []
immich_server_container_security_opt_auto: []
immich_server_container_security_opt_custom: []
# A list of groups to add the container to (`--group-add`).
# Contains strings like this: `"video"`.
# See the `--group-add` documentation for the `docker run` command.
immich_server_container_group_add: "{{ (immich_server_container_group_add_default + immich_server_container_group_add_auto + immich_server_container_group_add_custom) | unique }}"
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml
immich_server_container_group_add_default: |-
{{
{
'cpu': immich_server_container_group_add_default_cpu,
'nvenc': immich_server_container_group_add_default_nvenc,
'quicksync': immich_server_container_group_add_default_quicksync,
'rkmpp': immich_server_container_group_add_default_rkmpp,
'vaapi': immich_server_container_group_add_default_vaapi,
'vaapi-wsl': immich_server_container_group_add_default_vaapi_wsl,
}[immich_server_transcoding_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L10
immich_server_container_group_add_default_cpu: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L12
immich_server_container_group_add_default_nvenc: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L24
immich_server_container_group_add_default_quicksync: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L32-L33
immich_server_container_group_add_default_rkmpp: ["video"]
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L44
immich_server_container_group_add_default_vaapi: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.transcoding.yml#L48
immich_server_container_group_add_default_vaapi_wsl: []
immich_server_container_group_add_auto: []
immich_server_container_group_add_custom: []
# immich_server_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
# See `../templates/labels.j2` for details.
#
# To inject your own other container labels, see `immich_server_container_labels_additional_labels_custom`.
immich_server_container_labels_traefik_enabled: true
immich_server_container_labels_traefik_docker_network: "{{ immich_server_container_network }}"
immich_server_container_labels_traefik_hostname: "{{ immich_server_hostname }}"
# The path prefix must either be `/` or not end with a slash (e.g. `/immich`).
immich_server_container_labels_traefik_path_prefix: "{{ immich_server_path_prefix }}"
immich_server_container_labels_traefik_rule: "Host(`{{ immich_server_container_labels_traefik_hostname }}`){% if immich_server_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ immich_server_container_labels_traefik_path_prefix }}`){% endif %}"
immich_server_container_labels_traefik_priority: 0
immich_server_container_labels_traefik_entrypoints: web-secure
immich_server_container_labels_traefik_tls: "{{ immich_server_container_labels_traefik_entrypoints != 'web' }}"
immich_server_container_labels_traefik_tls_certResolver: default # noqa var-naming
# Controls whether a compression middleware will be injected into the middlewares list.
# This compression middleware is supposed to be defined elsewhere (using labels or a File provider, etc.) and is merely referenced by this router.
immich_server_container_labels_traefik_compression_middleware_enabled: false
immich_server_container_labels_traefik_compression_middleware_name: ""
# Controls which additional headers to attach to all HTTP responses.
# To add your own custom response headers, use `immich_server_container_labels_traefik_additional_response_headers_custom`
immich_server_container_labels_traefik_additional_response_headers: "{{ immich_server_container_labels_traefik_additional_response_headers_auto | combine(immich_server_container_labels_traefik_additional_response_headers_custom) }}"
immich_server_container_labels_traefik_additional_response_headers_auto: |
{{
{}
| combine ({'X-XSS-Protection': immich_server_http_header_xss_protection} if immich_server_http_header_xss_protection else {})
| combine ({'X-Content-Type-Options': immich_server_http_header_content_type_options} if immich_server_http_header_content_type_options else {})
| combine ({'Content-Security-Policy': immich_server_http_header_content_security_policy} if immich_server_http_header_content_security_policy else {})
| combine ({'Permissions-Policy': immich_server_http_header_permissions_policy} if immich_server_http_header_permissions_policy else {})
| combine ({'Strict-Transport-Security': immich_server_http_header_strict_transport_security} if immich_server_http_header_strict_transport_security and immich_server_container_labels_traefik_tls else {})
}}
immich_server_container_labels_traefik_additional_response_headers_custom: {}
# immich_server_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details.
# To add your own custom labels, use `immich_server_container_labels_additional_labels_custom`
#
# Example:
# immich_server_container_labels_additional_labels_custom:
# - my.label=1
# - another.label="here"
immich_server_container_labels_additional_labels: "{{ immich_server_container_labels_additional_labels_auto + immich_server_container_labels_additional_labels_custom }}"
immich_server_container_labels_additional_labels_auto: []
immich_server_container_labels_additional_labels_custom: []
# Specifies how often the container health-check will run.
#
# For Traefik based setups, it's important that the interval is short,
# because the interval value also specifies the "initial wait time".
# This is a Docker (moby) bug: https://github.com/moby/moby/issues/33410
# Without a successful healthcheck, Traefik will not register the service for reverse-proxying.
# Thus, the health interval determines the initial start-up time -- the smaller, the better.
#
# For non-Traefik setups, we use the default healthcheck interval (30s) to decrease overhead.
immich_server_container_health_interval: "{{ '5s' if immich_server_container_labels_traefik_enabled else '30s' }}"
# A list of extra arguments to pass to the container (`docker create` command)
immich_server_container_extra_arguments: "{{ immich_server_container_extra_arguments_auto + immich_server_container_extra_arguments_custom }}"
immich_server_container_extra_arguments_auto: []
immich_server_container_extra_arguments_custom: []
# List of systemd services that the immich/server systemd service depends on
immich_server_systemd_required_services_list: "{{ immich_server_systemd_required_services_list_default + immich_server_systemd_required_services_list_auto + immich_server_systemd_required_services_list_custom }}"
immich_server_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
immich_server_systemd_required_services_list_auto: []
immich_server_systemd_required_services_list_custom: []
# List of systemd services that the immich/server systemd service wants
immich_server_systemd_wanted_services_list: "{{ (immich_server_systemd_wanted_services_list_default + immich_server_systemd_wanted_services_list_auto + immich_server_systemd_wanted_services_list_custom) | unique }}"
immich_server_systemd_wanted_services_list_default: |-
{{
(
[immich_machine_learning_identifier + '.service'] if immich_machine_learning_enabled else []
)
}}
immich_server_systemd_wanted_services_list_auto: []
immich_server_systemd_wanted_services_list_custom: []
# Controls how long to wait for the container to stop gracefully before killing it.
immich_server_container_stop_grace_time_seconds: "{{ devture_systemd_docker_base_container_stop_grace_time_seconds }}"
# Controls how long the pre-start cleanup should wait for stale container-name release
# before failing startup explicitly.
immich_server_container_cleanup_timeout_seconds: "{{ devture_systemd_docker_base_container_cleanup_timeout_seconds }}"
# Controls the delay between pre-start cleanup retries.
immich_server_container_cleanup_retry_delay_seconds: "{{ devture_systemd_docker_base_container_cleanup_retry_delay_seconds }}"
# Shell command used in the systemd pre-start phase to deterministically remove a stale
# container and wait until Docker releases its name.
immich_server_container_cleanup_command: |
i=0;
while [ "$i" -lt {{ immich_server_container_cleanup_timeout_seconds }} ]; do
{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ immich_server_container_stop_grace_time_seconds }} {{ immich_server_identifier }} >/dev/null 2>&1 || true;
{{ devture_systemd_docker_base_host_command_docker }} rm -f {{ immich_server_identifier }} >/dev/null 2>&1 || true;
if {{ devture_systemd_docker_base_host_command_docker }} container inspect {{ immich_server_identifier }} >/dev/null 2>&1; then
i=$((i + 1));
sleep {{ immich_server_container_cleanup_retry_delay_seconds }};
continue;
fi;
if {{ devture_systemd_docker_base_host_command_docker }} info >/dev/null 2>&1; then
exit 0;
fi;
echo "Failed to query Docker daemon while cleaning up {{ immich_server_identifier }}" >&2;
exit 1;
done;
echo "Failed to remove stale container {{ immich_server_identifier }} after {{ immich_server_container_cleanup_timeout_seconds }} attempts" >&2;
exit 1
# Controls the TZ environment variable for the server component
immich_server_environment_variable_tz: Etc/UTC
# Controls the IMMICH_PORT environment variable for the server component
immich_server_environment_variable_immich_port: "{{ immich_server_http_port }}"
# Controls the IMMICH_ENV environment variable for the server component
# Known values: production, development, testing
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/server/src/enum.ts#L449-L453
immich_server_environment_variable_immich_env: production
# Controls the IMMICH_LOG_LEVEL environment variable for the server component
# Known values: verbose, debug, log, warn, error, fatal
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/server/src/enum.ts#L414-L421
immich_server_environment_variable_immich_log_level: log
# Controls the IMMICH_ALLOW_SETUP environment variable for the server component.
# Set to `false` to prevent the welcome/setup page from being shown on new installs,
# which prevents anyone from signing up / registering as an admin.
# This is useful if you have already initialized Immich and want to prevent
# the setup page from appearing if the database is reset for any reason.
immich_server_environment_variable_immich_allow_setup: true
# Controls the DB_URL environment variable for the server component
# URL-encode DB credentials to avoid Invalid URL failures with reserved characters
# (especially delimiters like ?, #, @, :, and / in userinfo).
# Jinja's urlencode does not escape '/', so we replace it explicitly as %2F.
immich_server_environment_variable_db_url: |-
{{
('postgresql://' + (immich_database_username | urlencode | replace('/', '%2F')) + ':' + (immich_database_password | urlencode | replace('/', '%2F')) + '@' + immich_database_hostname + ':' + (immich_database_port | string) + '/' + immich_database_name + '?sslmode=' + immich_database_sslmode)
if (immich_database_username and immich_database_hostname)
else ''
}}
# Controls the REDIS_URL environment variable for the server component
immich_server_environment_variable_redis_url: "{{ immich_redis_url }}"
# Controls the REDIS_SOCKET environment variable for the server component
immich_server_environment_variable_redis_socket: "{{ immich_redis_socket }}"
# Controls the REDIS_HOSTNAME environment variable for the server component
immich_server_environment_variable_redis_hostname: "{{ immich_redis_hostname }}"
# Controls the REDIS_PORT environment variable for the server component
immich_server_environment_variable_redis_port: "{{ immich_redis_port }}"
# Controls the REDIS_USERNAME environment variable for the server component
immich_server_environment_variable_redis_username: "{{ immich_redis_username }}"
# Controls the REDIS_PASSWORD environment variable for the server component
immich_server_environment_variable_redis_password: "{{ immich_redis_password }}"
# Controls the REDIS_DBINDEX environment variable for the server component
immich_server_environment_variable_redis_dbindex: "{{ immich_redis_dbindex }}"
# Controls the LIBVA_DRIVER_NAME environment variable for the server component
immich_server_environment_variable_libva_driver_name: "{% if immich_server_transcoding_hardware_acceleration == 'vaapi-wsl' %}d3d12{% endif %}"
# Controls the IMMICH_TRUSTED_PROXIES environment variable for the server component
# Example: "1.2.3.4" or "1.2.3.4/32, 5.6.7.0/24"
immich_server_environment_variable_immich_trusted_proxies: "{% if immich_server_container_labels_traefik_enabled %}0.0.0.0{% endif %}"
# Additional environment variables for the server container
immich_server_environment_variables_additional_variables: ""
# Specifies the value of the `X-XSS-Protection` header
# Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
#
# Learn more about it is here:
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
# - https://portswigger.net/web-security/cross-site-scripting/reflected
immich_server_http_header_xss_protection: "1; mode=block"
# Specifies the value of the `X-Content-Type-Options` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
immich_server_http_header_content_type_options: nosniff
# Specifies the value of the `Content-Security-Policy` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
immich_server_http_header_content_security_policy: frame-ancestors 'self'
# Specifies the value of the `Permission-Policy` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
immich_server_http_header_permissions_policy: "{{ 'interest-cohort=()' if immich_server_floc_optout_enabled else '' }}"
# Specifies the value of the `Strict-Transport-Security` header.
# See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
immich_server_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if immich_server_hsts_preload_enabled else '' }}"
# Controls whether to immich a "Permissions-Policy interest-cohort=();" header along with all responses
#
# Learn more about what it is here:
# - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
# - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
# - https://amifloced.org/
#
# Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
# See: `immich_http_header_permissions_policy`
immich_server_floc_optout_enabled: true
# Controls if HSTS preloading is enabled
#
# In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
# indicates a willingness to be "preloaded" into browsers:
# `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
# For more information visit:
# - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
# - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
# - https://hstspreload.org/#opt-in
# See: `immich_server_http_header_strict_transport_security`
immich_server_hsts_preload_enabled: false
########################################################################
# #
# /server #
# #
########################################################################
########################################################################
# #
# machine-learning #
# #
########################################################################
immich_machine_learning_enabled: true
immich_machine_learning_identifier: "{{ immich_identifier }}-machine-learning"
immich_machine_learning_base_path: "{{ immich_base_path }}/machine-learning"
# See `immich_machine_learning_environment_variable_machine_learning_cache_folder`
immich_machine_learning_cache_path: "{{ immich_machine_learning_base_path }}/cache"
# huggingface hub and its hf-xet (https://pypi.org/project/hf-xet/) dependency try to write to `/.cache`,
# so we provide a separate directory for that.
immich_machine_learning_dot_cache_path: "{{ immich_machine_learning_base_path }}/dot-cache"
# See `immich_machine_learning_container_tmpfs_tmp_enabled`
immich_machine_learning_tmp_path: "{{ immich_machine_learning_base_path }}/tmp"
immich_machine_learning_version: "{{ immich_version }}{{ immich_machine_learning_version_hardware_acceleration_suffix }}"
# For hardware acceleration, one needs to add one of: `-armnn`, `-cuda`, `-rocm`, `-openvino`, `-rknn` to the image tag.
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/docker-compose.yml#L36-L38
immich_machine_learning_version_hardware_acceleration_suffix: |-
{{
{
'armnn': '-armnn',
'cuda': '-cuda',
'cpu': "",
'openvino': '-openvino',
'openvino-wsl': '-openvino',
'rknn': '-rknn',
'rocm': '-rocm',
}[immich_machine_learning_hardware_acceleration]
}}
# The HTTP port used internally (in the container) by the machine-learning component
immich_machine_learning_http_port: 3003
# Controls how to configure the machine-learning container for hardware acceleration.
#
# One of: armnn, cuda, cpu, openvino, openvino-wsl, rknn, rocm
# Ref:
# - https://immich.app/docs/features/ml-hardware-acceleration
# - https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml
# - https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/docker-compose.yml
immich_machine_learning_hardware_acceleration: cpu
immich_machine_learning_container_image: "{{ immich_machine_learning_container_image_registry_prefix }}immich-app/immich-machine-learning:{{ immich_machine_learning_container_image_tag }}"
immich_machine_learning_container_image_tag: "{{ immich_machine_learning_version }}"
immich_machine_learning_container_image_registry_prefix: "{{ immich_machine_learning_container_image_registry_prefix_upstream }}"
immich_machine_learning_container_image_registry_prefix_upstream: "{{ immich_machine_learning_container_image_registry_prefix_upstream_default }}"
immich_machine_learning_container_image_registry_prefix_upstream_default: ghcr.io/
# Controls the user that the machine-learning container runs as. Set to `0` to run as root.
immich_machine_learning_container_uid: "{{ immich_uid }}"
# Controls the group that the machine-learning container runs as. Set to `0` to run as root.
immich_machine_learning_container_gid: "{{ immich_gid }}"
# Controls whether the machine-learning container drops all capabilities (`--cap-drop=ALL`).
immich_machine_learning_container_cap_drop_all_enabled: true
# Controls whether the machine-learning container adds some capabilities (`--cap-add`).
# See: immich_machine_learning_container_cap_add_capabilities
immich_machine_learning_container_cap_add_enabled: "{{ immich_machine_learning_container_cap_drop_all_enabled }}"
immich_machine_learning_container_cap_add_capabilities: "{{ (immich_machine_learning_container_cap_add_capabilities_default + immich_machine_learning_container_cap_add_capabilities_auto + immich_machine_learning_container_cap_add_capabilities_custom) | unique }}"
immich_machine_learning_container_cap_add_capabilities_default: ["CHOWN", "DAC_OVERRIDE"]
immich_machine_learning_container_cap_add_capabilities_auto: []
immich_machine_learning_container_cap_add_capabilities_custom: []
# Controls whether the machine-learning container runs with a read-only filesystem (`--read-only`).
immich_machine_learning_container_read_only_enabled: true
# Controls whether /tmp should be a tmpfs.
# If not enabled, /tmp will be persisted to disk (see `immich_machine_learning_tmp_path`).
immich_machine_learning_container_tmpfs_tmp_enabled: "{{ immich_machine_learning_container_read_only_enabled }}"
immich_machine_learning_container_tmpfs_tmp_size: "{{ (ansible_facts['memtotal_mb'] / 2) | round | int }}m"
# The base container network for the machine-learning service. It will be auto-created by this role if it doesn't exist already.
immich_machine_learning_container_network: "{{ immich_server_container_network }}"
# A list of additional container networks that the machine-learning container would be connected to.
# The role does not create these networks, so make sure they already exist.
# Use this to expose this container to another reverse proxy, which runs in a different container network.
immich_machine_learning_container_additional_networks: "{{ (immich_machine_learning_container_additional_networks_default + immich_machine_learning_container_additional_networks_auto + immich_machine_learning_container_additional_networks_custom) | unique }}"
immich_machine_learning_container_additional_networks_default: []
immich_machine_learning_container_additional_networks_auto: []
immich_machine_learning_container_additional_networks_custom: []
# Specify how the container publishes its HTTP port (as defined by `immich_machine_learning_http_port`).
#
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:2586"), or empty string to not expose.
# See immich_machine_learning_http_port
immich_machine_learning_container_http_host_bind_port: ""
# A list of additional "volumes" to mount in the container.
# This list gets populated dynamically at runtime. You can provide a different default value,
# if you wish to mount your own files into the container.
# Contains definition objects like this: `{"type": "bind", "src": "/outside", "dst": "/inside", "options": "readonly"}.
# See the `--mount` documentation for the `docker run` command.
immich_machine_learning_container_additional_volumes: "{{ immich_machine_learning_container_additional_volumes_default + immich_machine_learning_container_additional_volumes_auto + immich_machine_learning_container_additional_volumes_custom }}"
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml
immich_machine_learning_container_additional_volumes_default: |-
{{
{
'armnn': immich_machine_learning_container_additional_volumes_default_armnn,
'cuda': immich_machine_learning_container_additional_volumes_default_cuda,
'cpu': immich_machine_learning_container_additional_volumes_default_cpu,
'openvino': immich_machine_learning_container_additional_volumes_default_openvino,
'openvino-wsl': immich_machine_learning_container_additional_volumes_default_openvino_wsl,
'rknn': immich_machine_learning_container_additional_volumes_default_rknn,
'rocm': immich_machine_learning_container_additional_volumes_default_rocm,
}[immich_machine_learning_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L13-L15
immich_machine_learning_container_additional_volumes_default_armnn: |-
{{
(
[
{
'type': 'bind',
'src': immich_machine_learning_container_additional_volumes_default_armn_mali_firmware_path,
'dst': immich_machine_learning_container_additional_volumes_default_armn_mali_firmware_path,
'options': 'ro'
}
]
if immich_machine_learning_container_additional_volumes_default_armn_mali_firmware_enabled
else []
)
+
(
[
{
'type': 'bind',
'src': immich_machine_learning_container_additional_volumes_default_armn_mali_driver_path,
'dst': immich_machine_learning_container_additional_volumes_default_armn_mali_driver_path,
'options': 'ro'
}
]
if immich_machine_learning_container_additional_volumes_default_armn_mali_driver_enabled
else []
)
}}
immich_machine_learning_container_additional_volumes_default_armn_mali_firmware_enabled: true
immich_machine_learning_container_additional_volumes_default_armn_mali_firmware_path: /lib/firmware/mali_csffw.bin
immich_machine_learning_container_additional_volumes_default_armn_mali_driver_enabled: true
immich_machine_learning_container_additional_volumes_default_armn_mali_driver_path: /usr/lib/libmali.so
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L26
immich_machine_learning_container_additional_volumes_default_cuda: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L24
immich_machine_learning_container_additional_volumes_default_cpu: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L48-L49
immich_machine_learning_container_additional_volumes_default_openvino: |
{{
(
[
{
'type': 'bind',
'src': immich_machine_learning_container_additional_volumes_default_openvino_usb_path,
'dst': immich_machine_learning_container_additional_volumes_default_openvino_usb_path,
'options': ""
}
]
if immich_machine_learning_container_additional_volumes_default_openvino_usb_enabled
else []
)
}}
immich_machine_learning_container_additional_volumes_default_openvino_usb_enabled: true
immich_machine_learning_container_additional_volumes_default_openvino_usb_path: /dev/bus/usb
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L55-L57
immich_machine_learning_container_additional_volumes_default_openvino_wsl: |-
{{
(
[
{
'type': 'bind',
'src': immich_machine_learning_container_additional_volumes_default_openvino_wsl_usb_path,
'dst': immich_machine_learning_container_additional_volumes_default_openvino_wsl_usb_path,
'options': ""
}
]
if immich_machine_learning_container_additional_volumes_default_openvino_wsl_usb_enabled
else []
)
+
(
[
{
'type': 'bind',
'src': immich_machine_learning_container_additional_volumes_default_openvino_wsl_usr_lib_wsl_path,
'dst': immich_machine_learning_container_additional_volumes_default_openvino_wsl_usr_lib_wsl_path,
'options': ""
}
]
if immich_machine_learning_container_additional_volumes_default_openvino_wsl_usr_lib_wsl_enabled
else []
)
}}
immich_machine_learning_container_additional_volumes_default_openvino_wsl_usb_enabled: true
immich_machine_learning_container_additional_volumes_default_openvino_wsl_usb_path: /dev/bus/usb
immich_machine_learning_container_additional_volumes_default_openvino_wsl_usr_lib_wsl_enabled: true
immich_machine_learning_container_additional_volumes_default_openvino_wsl_usr_lib_wsl_path: /usr/lib/wsl
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L17
immich_machine_learning_container_additional_volumes_default_rknn: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L36
immich_machine_learning_container_additional_volumes_default_rocm: []
immich_machine_learning_container_additional_volumes_auto: []
immich_machine_learning_container_additional_volumes_custom: []
# A list of additional "devices" to attach to the container.
# Contains definition objects like this: `{"src": "/dev/mali0", "dst": "/dev/mali0", "options": "rwm"}`.
# See the `--device` documentation for the `docker run` command.
immich_machine_learning_container_devices: "{{ immich_machine_learning_container_devices_default + immich_machine_learning_container_devices_auto + immich_machine_learning_container_devices_custom }}"
# Ref: https://github.com/immich-app/immich/blob/main/docker/hwaccel.ml.yml
immich_machine_learning_container_devices_default: |-
{{
{
'armnn': immich_machine_learning_container_devices_default_armnn,
'cuda': immich_machine_learning_container_devices_default_cuda,
'cpu': immich_machine_learning_container_devices_default_cpu,
'openvino': immich_machine_learning_container_devices_default_openvino,
'openvino-wsl': immich_machine_learning_container_devices_default_openvino_wsl,
'rknn': immich_machine_learning_container_devices_default_rknn,
'rocm': immich_machine_learning_container_devices_default_rocm,
}[immich_machine_learning_hardware_acceleration]
}}
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L11-L12
immich_machine_learning_container_devices_default_armnn: |-
{{
(
[
{
'src': immich_machine_learning_container_devices_default_armnn_mali0_path,
'dst': immich_machine_learning_container_devices_default_armnn_mali0_path,
'options': 'rwm'
}
]
if immich_machine_learning_container_devices_default_armnn_mali0_enabled
else []
)
}}
immich_machine_learning_container_devices_default_armnn_mali0_enabled: true
immich_machine_learning_container_devices_default_armnn_mali0_path: /dev/mali0
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L26
immich_machine_learning_container_devices_default_cuda: []
# Ref: https://github.com/immich-app/immich/blob/a122d4b969e4ed2b462f1325c2f84cb874a07936/docker/hwaccel.ml.yml#L24
immich_machine_learning_container_devices_default_cpu: []