Skip to content

Commit

Permalink
doc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed Nov 25, 2024
1 parent b16dfbe commit 02e2c2e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions docs/docs/guides/remote-machine-learning.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Remote Machine Learning

To alleviate [performance issues on low-memory systems](/docs/FAQ.mdx#why-is-immich-slow-on-low-memory-systems-like-the-raspberry-pi) like the Raspberry Pi, you may also host Immich's machine learning container on a more powerful system, such as your laptop or desktop computer. The server container will send requests containing the image preview to the remote machine learning container for processing. The machine learning container does not persist this data or associate it with a particular user.
To alleviate [performance issues on low-memory systems](/docs/FAQ.mdx#why-is-immich-slow-on-low-memory-systems-like-the-raspberry-pi) like the Raspberry Pi, you may also host Immich's machine learning container on a more powerful system, such as your laptop or desktop computer. The server container will send requests containing the image preview to the remote machine learning container for processing. The machine learning container does not persist this data or associate it with a particular user.

:::info
Smart Search and Face Detection will use this feature, but Facial Recognition will not. This is because Facial Recognition uses the *outputs* of these models that have already been saved to the database. As such, its processing is between the server container and the database.
Smart Search and Face Detection will use this feature, but Facial Recognition will not. This is because Facial Recognition uses the _outputs_ of these models that have already been saved to the database. As such, its processing is between the server container and the database.
:::

:::danger
Expand All @@ -12,7 +12,10 @@ Image previews are sent to the remote machine learning container. Use this optio

1. Ensure the remote server has Docker installed
2. Copy the following `docker-compose.yml` to the remote server
- If using hardware acceleration, the [hwaccel.ml.yml](https://github.com/immich-app/immich/releases/latest/download/hwaccel.ml.yml) file also needs to be added and the `docker-compose.yml` needs to be configured as described in the [hardware acceleration documentation](/docs/features/ml-hardware-acceleration)

:::info
If using hardware acceleration, the [hwaccel.ml.yml](https://github.com/immich-app/immich/releases/latest/download/hwaccel.ml.yml) file also needs to be added and the `docker-compose.yml` needs to be configured as described in the [hardware acceleration documentation](/docs/features/ml-hardware-acceleration)
:::

```yaml
name: immich_remote_ml
Expand All @@ -37,16 +40,20 @@ volumes:
```
3. Start the remote machine learning container by running `docker compose up -d`
- Please note that version mismatches between both hosts may cause instabilities and bugs, so remember to update this container as well when updating the local Immich instance

:::info
Version mismatches between both hosts may cause instabilities and bugs, so remember to update this container as well when updating the local Immich instance.
:::

4. Navigate to the [Machine Learning Settings](https://my.immich.app/admin/system-settings?isOpen=machine-learning)
5. Click *Add URL*
5. Click _Add URL_
6. Fill the new field with the URL to the remote machine learning container. In the simplest case where the server is on the same local network, this may use the server's private IP. For example, if the private IP of the remote server is 192.168.0.50, the resulting URL will be `http://192.168.0.50:3003`. More advanced configuration is left as an exercise to the reader

## Forcing remote processing

Adding a new URL to the settings is recommended over replacing the existing URL. This is because it will allow machine learning tasks to be processed successfully when the remote server is down by falling back to the local machine learning container. If you do not want machine learning tasks to be processed locally when the remote server is not available, you can instead replace the existing URL and only provide the remote container's URL. If doing this, you can remove the local machine learning container from the `docker-compose.yml` file to save resources, as it will never be used.

Do note that this will mean that Smart Search and Face Detection jobs will fail to be processed when the remote instance is not available. This in turn means that tasks dependent on these features—Duplicate Detection and Facial Recognition—will not run for affected assets. If this occurs, you must manually click the *Missing* button next to Smart Search and Face Detection in the [Job Status](http://my.immich.app/admin/jobs-status) page for the jobs to be retried.
Do note that this will mean that Smart Search and Face Detection jobs will fail to be processed when the remote instance is not available. This in turn means that tasks dependent on these features—Duplicate Detection and Facial Recognition—will not run for affected assets. If this occurs, you must manually click the _Missing_ button next to Smart Search and Face Detection in the [Job Status](http://my.immich.app/admin/jobs-status) page for the jobs to be retried.

## Load balancing

Expand Down

0 comments on commit 02e2c2e

Please sign in to comment.