540 字
3 分钟
1,452 次阅读
UNRAID部署Immich并启用cuda加速
安装并配置docker-compose
如图所示

创建一个immich的compose项目

编辑compose文件

注意以下几个点
- 本文件只适用于有NVIDIA显卡的用户
- 算力需要>5.3 cuda算力查询地址
- 驱动程序>= 545
- Data Base放在SSD上的用户请注释掉DB_STORAGE_TYPE: ‘HDD’
- 修改所有/mnt/user/nas/Photos为自己适合的路径
name: immich
services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:release # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: - /mnt/user/nas/Photos/libraries:/usr/src/app/libraries - /mnt/user/nas/Photos/immich:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro environment: - MACHINE_LEARNING_GPU_ACCELERATION=cuda - NVIDIA_VISIBLE_DEVICES=all ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false runtime: nvidia
immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu volumes: - /mnt/user/nas/Photos/model-cache:/cache restart: always healthcheck: disable: false
redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177 healthcheck: test: redis-cli ping || exit 1 restart: always
database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 environment: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres POSTGRES_DB: immich POSTGRES_INITDB_ARGS: '--data-checksums' # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs DB_STORAGE_TYPE: 'HDD' volumes: - /mnt/user/nas/Photos/postgres:/var/lib/postgresql/data restart: always保存后点击COMPOSE UP,等待镜像拉取并启动
检查GPU状态
进入immich_server和immich_machine_learning的控制台输入
nvidia-smi输出显卡信息代表容器调用GPU成功

访问并配置immich
浏览器进入http://[ip]:2283,以访问immich,初始化配置后,进入主面板,单击右上角头像-系统管理-设置-机器学习设置-智能搜索-CLIP 模型改为
XLM-Roberta-Large-Vit-B-16Plus
进入immich_machine_learning日志界面,如果识别日志包含CUDA字样表示启用成功

机器学习设置-视频转码设置-硬件加速-加速器API 选择 NVENC

UNRAID部署Immich并启用cuda加速
https://nvcc-v.com/2025/07/11/unraid-immich-cuda-setup/ KEEP EXPLORING