This guide demonstrates how to deploy Immich using Docker Compose and Portainer, with detailed instructions for optimizing Traditional Chinese reverse geocoding for Taiwan, configuring video transcoding and machine learning hardware acceleration (using NVIDIA as an example), and replacing machine learning models.
This tutorial follows the Docker Compose approach from the official Immich documentation, deploying Immich (including immich-server, immich-machine-learning, Redis, and PostgreSQL) using Portainer. Before proceeding, ensure you have Docker, Docker Compose installed, and a Portainer container running.
Customize the following parameters according to your preferences:
UPLOAD_LOCATION: Storage location for photo library and data (e.g., /mnt/smb/immich). I personally set this to an SMB-mounted NAS location.
DB_DATA_LOCATION: PostgreSQL database location (e.g., /appdata/immich/postgres). I place this directly on the local hard drive.
TZ: Timezone (Asia/Taipei).
NOTE: Other parameters don’t need modification.
Start the stack to complete the basic Immich deployment.
For advanced configurations, refer to the following sections.
Optimizing Reverse Geocoding Data (Chinese Localization + Taiwan Place Name Optimization)#
Immich’s default geographic information displays in English, and Taiwan place names lack precision. To address this issue, I developed the immich-geodata-zh-tw project to optimize reverse geocoding for Taiwan:
Translates place names into Traditional Chinese commonly used in Taiwan
For more details (including installation verification, manual deployment, version specification, troubleshooting, etc.), please refer to the project introduction article:
For Simplified Chinese users, refer to ZingLix/immich-geodata-cn, which provides Simplified Chinese translation and optimization for place names in China.
Before installation, you must install the GPU driver and container runtime.
For NVIDIA GPUs: Install the NVIDIA Driver and NVIDIA Container Toolkit.
Stop the stack.
Download the configuration file:
Download hwaccel.transcoding.yml from the official site and place it at a specified location (e.g., /appdata/immich/hwaccel.transcoding.yml).
Edit the stack:
Add extends and modify the service value based on your hardware (Intel iGPU: quicksync, NVIDIA GPU: nvenc).
immich-server:container_name:immich_serverimage:ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}extends:file:/mnt/user/appdata/immich/hwaccel.transcoding.ymlservice:nvenc# set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding# Other configurations omitted
For NVIDIA GPUs, you also need to add:
immich-server:# Other configurations omittedruntime:nvidiaenvironment:- NVIDIA_VISIBLE_DEVICES=all# Other configurations omitted
Start the stack.
Configure hardware acceleration device:
Settings → Video Transcoding → Hardware Acceleration → Corresponding option.
Download hwaccel.ml.yml from the official site and place it at a specified location (e.g., /mnt/user/appdata/immich/hwaccel.ml.yml).
Edit the stack:
image:
Add a suffix to the image name based on hardware: -cuda.
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.# Example tag: ${IMMICH_VERSION:-release}-cudaimage:ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
extends:
Add extends and modify the service value based on hardware (NVIDIA GPU: cuda, Intel GPU: openvino).
immich-machine-learning:# Other configurations omittedextends:# uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-accelerationfile:/mnt/user/appdata/immich/hwaccel.ml.ymlservice:cuda# set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable# Other configurations omitted
note
The immich-machine-learning container does NOT require runtime=nvidia or the NVIDIA_VISIBLE_DEVICES=all variable.
Start the stack.
note
After configuring machine learning hardware acceleration, no additional settings are required in the WebUI.
Since the default ViT-B-32__openai model has insufficient compatibility with Chinese, you need to select a multilingual CLIP model.
The official documentation provides accuracy comparison tables for different models across various languages, along with detailed reports on VRAM requirements and inference time. Users can choose based on their needs. (All models can be found on Immich’s Hugging Face collections: CLIP and Multilingual CLIP)
We can refer to the “Simplified Chinese” table for selection. If you have sufficient VRAM, you can directly choose the best-performing model nllb-clip-large-siglip__v1:
Simplified Chinese Performance Comparison Table for Models
Configure the model:
In the settings page, go to Machine Learning Settings → Smart Search → CLIP Model, and enter the desired model name.
tip
No need to manually download models; the immich-machine-learning container will automatically download the corresponding model when Immich needs to invoke it.
After initial configuration, manually run the Smart Search job once and check the immich-machine-learning container logs to verify whether the model was downloaded and loaded automatically.
For a detailed model list, refer to Immich’s Hugging Face collection on Facial Recognition.
According to online sources, antelopev2 currently provides the best results.
Since the official documentation doesn’t provide VRAM overhead information, here are my test results for reference:
note
Test GPU: NVIDIA Tesla P4.
Since the environment wasn’t specifically configured for idle GPU state, subtract the initial VRAM overhead (approximately 0.416 GiB) from the table values to get closer to the model’s actual VRAM usage.
The “Storage Overhead” column represents the model file size.
Facial Recognition (sorted by size in descending order)
This article introduces n8n-ffmpeg, an open-source project that extends the official n8n Docker image by pre-installing FFmpeg and automatically syncing with the latest official releases. We will explore the automated build process, the technical adjustments required by recent official changes, and how to deploy it in a production environment.