-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathreadme-vars.yml
216 lines (183 loc) · 9.42 KB
/
readme-vars.yml
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
---
# project information
project_name: immich
project_url: "https://immich.app/"
project_logo: "https://raw.githubusercontent.com/immich-app/immich/main/design/immich-logo-inline-dark.png"
project_blurb: "Immich is a high performance self-hosted photo and video backup solution."
project_github_repo_url: "https://github.com/imagegenius/docker-{{ project_name }}"
project_blurb_optional_extras_enabled: false
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest" }
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest" }
# development version
development_versions: true
development_versions_items:
- { tag: "latest", desc: "Latest Immich release." }
- { tag: "noml", desc: "Latest Immich release. Machine-learning is completely removed." }
- { tag: "cuda", desc: "Latest Immich release. Machine-learning supports cuda (Nvidia)." }
- { tag: "openvino", desc: "Latest Immich release. Machine-learning supports openvino (Intel)." }
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_net: false
param_usage_include_env: true
param_env_vars:
- { env_var: "DB_HOSTNAME", env_value: "192.168.1.x", desc: "PostgreSQL Host" }
- { env_var: "DB_USERNAME", env_value: "postgres", desc: "PostgreSQL Username" }
- { env_var: "DB_PASSWORD", env_value: "postgres", desc: "PostgreSQL Password" }
- { env_var: "DB_DATABASE_NAME", env_value: "immich", desc: "PostgreSQL Database Name" }
- { env_var: "REDIS_HOSTNAME", env_value: "192.168.1.x", desc: "Redis Hostname" }
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "path_to_appdata", desc: "Contains machine learning models (~1.5GB with default models)" }
- { vol_path: "/photos", vol_host_path: "path_to_photos", desc: "Contains all the photos uploaded to Immich" }
param_usage_include_ports: true
param_ports:
- { external_port: "8080", internal_port: "8080", port_desc: "WebUI Port" }
param_device_map: false
cap_add_param: false
# optional container parameters
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "DB_PORT", env_value: "5432", desc: "PostgreSQL Port" }
- { env_var: "REDIS_PORT", env_value: "6379", desc: "Redis Port" }
- { env_var: "REDIS_PASSWORD", env_value: "", desc: "Redis password" }
- { env_var: "MACHINE_LEARNING_HOST", env_value: "0.0.0.0", desc: "Immich machine-learning host" }
- { env_var: "MACHINE_LEARNING_PORT", env_value: "3003", desc: "Immich machine-learning port" }
- { env_var: "MACHINE_LEARNING_WORKERS", env_value: "1", desc: "Machine learning workers" }
- { env_var: "MACHINE_LEARNING_WORKER_TIMEOUT", env_value: "120", desc: "Machine learning worker timeout" }
opt_param_usage_include_vols: true
opt_param_volumes:
- { vol_path: "/libraries", vol_host_path: "path_to_libraries", desc: "External libraries to track assets stored outside of Immich" }
opt_param_usage_include_ports: false
opt_param_device_map: false
opt_cap_add_param: false
optional_block_1: false
# unraid template
unraid_requirement: "PostgreSQL 14/15/16 with [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs), Redis"
unraid_category: "Backup: Cloud: MediaApp:Photos"
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Access the WebUI at `http://your-ip:8080`. Follow the setup wizard to configure Immich.
> [!IMPORTANT]
> **This image is not officially supported by the Immich team.**
>
> Please read and accept the consiquences of using this heavily active (in development) project.
> - ⚠️ The project is under very active development.
> - ⚠️ Expect bugs and breaking changes.
> - ⚠️ Do not use the app as the only way to store your photos and videos.
> - ⚠️ Always follow 3-2-1 backup plan for your precious photos and videos!
>
> as stated in the official [readme](https://github.com/immich-app/immich#disclaimer).
### Requirements
- **PostgreSQL**: Version 14, 15, or 16 with [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs) setup externally.
- **Redis**: Setup externally or within the container using a docker mod.
#### Docker Mod for Redis
- Set `DOCKER_MODS=imagegenius/mods:universal-redis`
- Configure `REDIS_HOSTNAME` to `localhost`
#### SSL Connection for PostgreSQL
To use SSL, include a PostgreSQL URL in the `DB_URL` environment variable.
## Hardware Acceleration
### Intel Hardware Acceleration
To enable Intel Quicksync:
1. Ensure container access to `/dev/dri`.
2. Add `/dev/dri` to your Docker run command:
```bash
docker run --device=/dev/dri:/dev/dri ...
```
To enable OpenVINO:
1. Make sure your [CPU supports OpenVINO](https://docs.openvino.ai/2024/about-openvino/system-requirements.html)
2. Add `--device-cgroup-rule='c 189:* rmw'` and `-v /dev/bus/usb:/dev/bus/usb` to your Docker run command:
```bash
docker run --device=/dev/dri --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb ...
```
### Nvidia Hardware Acceleration
1. Install the Nvidia container runtime as per [these instructions](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
2. Create a new Docker container using the Nvidia runtime:
- Use `--runtime=nvidia` and `NVIDIA_VISIBLE_DEVICES=all` in your Docker run command, or specify a particular GPU UUID instead of `all`.
```bash
docker run --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all
```
- Alternatively, use `--gpus=all` to enable all GPUs.
```bash
docker run --gpus=all ...
```
## Add Existing Libraries
- Mount the existing library folder to `/libraries`.
- Set `/libraries` (or `/libraries/<user>` for multiple users) as the external path in the administration settings.
- In account settings, add a new library with the path set to `/libraries` or `/libraries/<user>`.
external_application_snippet_enabled: true
external_application_cli_block: |
# By default, ports for the databases are opened, be careful when deploying it
# Redis:
docker run -d \
--name=redis \
-p 6379:6379 \
redis
# PostgreSQL 14:
docker run -d \
--name=postgres14 \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=immich \
-v path_to_postgres:/var/lib/postgresql/data \
-p 5432:5432 \
tensorchord/pgvecto-rs:pg14-v0.2.0
external_application_compose_block: |
# By default, ports for the databases are opened, be careful when deploying it
# Redis:
redis:
image: redis
ports:
- 6379:6379
container_name: redis
# PostgreSQL 14:
postgres14:
image: tensorchord/pgvecto-rs:pg14-v0.2.0
ports:
- 5432:5432
container_name: postgres14
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: immich
volumes:
- path_to_postgres:/var/lib/postgresql/data
external_application_unraid_block: |
You can also use a docker mods to start redis within the container,
Set `DOCKER_MODS=imagegenius/mods:universal-redis`, and `REDIS_HOSTNAME` to `localhost`.
# changelog
changelogs:
- { date: "22.01.24:", desc: "support GPU acceleration with CUDA for machine-learning" }
- { date: "23.12.23:", desc: "move to using seperate immich baseimage" }
- { date: "07.12.23:", desc: "rebase to ubuntu mantic" }
- { date: "07.12.23:", desc: "remove typesense (no longer needed)" }
- { date: "24.09.23:", desc: "house cleaning" }
- { date: "24.09.23:", desc: "add vars for ml workers/timeout" }
- { date: "29.07.23:", desc: "remove cuda acceleration for machine-learning" }
- { date: "23.05.23:", desc: "rebase to ubuntu lunar and support cuda acceleration for machine-learning" }
- { date: "22.05.23:", desc: "deprecate postgresql docker mod" }
- { date: "18.05.23:", desc: "add support for facial recognition" }
- { date: "07.05.23:", desc: "remove unused `JWT_SECRET` env" }
- { date: "13.04.23:", desc: "add variables to disable typesense and machine learning" }
- { date: "10.04.23:", desc: "fix gunicorn" }
- { date: "04.04.23:", desc: "use environment variables to set location of the photos folder" }
- { date: "09.04.23:", desc: "Cache is downloaded to the host (/config/transformers)" }
- { date: "01.04.23:", desc: "remove unused Immich environment variables" }
- { date: "21.03.23:", desc: "Add service checks" }
- { date: "05.03.23:", desc: "add typesense" }
- { date: "27.02.23:", desc: "re-enable aarch64 with pre-release torch build" }
- { date: "18.02.23:", desc: "use machine-learning with python" }
- { date: "11.02.23:", desc: "use external app block" }
- { date: "09.02.23:", desc: "Use Immich environment variables for immich services instead of hosts file" }
- { date: "09.02.23:", desc: "execute CLI with the command immich" }
- { date: "04.02.23:", desc: "shrink image" }
- { date: "26.01.23:", desc: "add unraid migration to readme" }
- { date: "26.01.23:", desc: "use find to apply chown to /app, excluding node_modules" }
- { date: "26.01.23:", desc: "enable ci testing" }
- { date: "24.01.23:", desc: "fix services starting prematurely, causing permission errors." }
- { date: "23.01.23:", desc: "add noml image to readme and add aarch64 image to readme, make github release stable" }
- { date: "21.01.23:", desc: "BREAKING: Redis is removed. Update missing param_env_vars & opt_param_env_vars for redis & postgres" }
- { date: "02.01.23:", desc: "Initial Release." }