feat(immich): switch to NVENC for transcoding and CUDA for ML inference
- immich-server: add runtime: nvidia + NVIDIA_DRIVER_CAPABILITIES=video, compute,utility to enable NVENC hardware H.264 transcoding - immich-machine-learning: change image tag to :release-cuda so CUDAExecutionProvider is selected over CPUExecutionProvider for CLIP, face detection, and OCR - Update GPU Verification section in README with verification commands and note on resetting QSV → NVENC in the admin UI
This commit is contained in:
parent
11935bd02a
commit
eb3c0a0f00
2 changed files with 17 additions and 4 deletions
|
|
@ -112,10 +112,20 @@ Immich is deployed in a **Privileged LXC** to ensure:
|
|||
|
||||
## GPU Verification
|
||||
|
||||
Once the stack is running, you can verify GPU usage by the Machine Learning container:
|
||||
Both `immich-server` and `immich-machine-learning` run with `runtime: nvidia`:
|
||||
|
||||
- **immich-server** — uses NVENC for hardware-accelerated H.264 video transcoding (`NVIDIA_DRIVER_CAPABILITIES=video,compute,utility`)
|
||||
- **immich-machine-learning** — uses the `:release-cuda` image with `CUDAExecutionProvider` for CLIP embeddings, face detection, and OCR
|
||||
|
||||
Verify GPU access after startup:
|
||||
|
||||
```bash
|
||||
docker exec -it immich_machine_learning nvidia-smi
|
||||
# Confirm NVIDIA device visible in server (needed for NVENC)
|
||||
docker exec immich_server ls /dev/nvidia0
|
||||
|
||||
# Confirm CUDA ONNX provider active in ML container
|
||||
docker exec immich_machine_learning python3 -c 'import onnxruntime; print(onnxruntime.get_available_providers())'
|
||||
# Expected: ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
|
||||
```
|
||||
|
||||
You should see the RTX A400 listed. Immich will use this for facial recognition and object detection.
|
||||
After verifying, go to **Administration → Video Transcoding** in the Immich UI and confirm Hardware Acceleration is set to **NVENC**. If it shows QSV (from a prior config), change it to NVENC and re-run the Video Conversion job.
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ services:
|
|||
immich-server:
|
||||
container_name: immich_server
|
||||
image: ghcr.io/immich-app/immich-server:{{IMMICH_VERSION:-release}}
|
||||
runtime: nvidia
|
||||
volumes:
|
||||
- {{IMMICH_UPLOAD_LOCATION}}:/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
|
@ -24,6 +25,8 @@ services:
|
|||
- OAUTH_BUTTON_TEXT={{OIDC_NAME:-}}
|
||||
- OAUTH_AUTO_LAUNCH={{OIDC_AUTO_REDIRECT:-false}}
|
||||
- OAUTH_MOBILE_OVERRIDE_ENABLED={{OIDC_MOBILE_OVERRIDE_ENABLED:-false}}
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
- NVIDIA_DRIVER_CAPABILITIES=video,compute,utility
|
||||
- DISABLE_PASSWORD_LOGIN={{OIDC_DISABLE_LOCAL_AUTH:-false}}
|
||||
# Email (optional - leave blank to disable)
|
||||
- SMTP_HOST={{EMAIL_HOST:-}}
|
||||
|
|
@ -51,7 +54,7 @@ services:
|
|||
|
||||
immich-machine-learning:
|
||||
container_name: immich_machine_learning
|
||||
image: ghcr.io/immich-app/immich-machine-learning:{{IMMICH_VERSION:-release}}
|
||||
image: ghcr.io/immich-app/immich-machine-learning:{{IMMICH_VERSION:-release}}-cuda
|
||||
runtime: nvidia
|
||||
volumes:
|
||||
- {{IMMICH_DATA_DIR}}/model-cache:/cache
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue