services: optimisarr: image: ghcr.io/jellman86/optimisarr:dev container_name: optimisarr restart: unless-stopped stop_grace_period: 2h5m ports: - "${OPTIMISARR_PORT:-8787}:8787" environment: PUID: "${PUID:-1000}" PGID: "${PGID:-1000}" UMASK: "${UMASK:-002}" TZ: "${TZ:-Europe/London}" ASPNETCORE_URLS: "http://0.0.0.0:8787" OPTIMISARR_CONFIG_DIR: "${OPTIMISARR_CONFIG_DIR:-/config}" OPTIMISARR_WORK_DIR: "${OPTIMISARR_WORK_DIR:-/data/.optimisarr/work}" OPTIMISARR_TRASH_DIR: "${OPTIMISARR_TRASH_DIR:-/data/.optimisarr/trash}" Logging__LogLevel__Default: "${OPTIMISARR_LOG_LEVEL:-Information}" volumes: - ./config:/config # Mount one common parent. Libraries, work, and quarantine below /data can then use # atomic moves; a deliberately separate scratch mount requires the verified fallback. - /path/to/storage:/data # --- Intel iGPU (e.g. N100) / AMD GPU: VA-API + Intel QSV --- # Map the render node and add the container user to the host's "render" group so it # can open it. Find the GID with: stat -c '%g' /dev/dri/renderD128 # Set RENDER_GID to that value (107 on the documented TrueNAS SCALE setup). # Remove this block and the # group_add line if the host has no /dev/dri. Transcoding uses the bundled # jellyfin-ffmpeg, which ships the Intel iHD driver + oneVPL, so no host driver # packages are needed — only the device and group access. devices: - /dev/dri:/dev/dri group_add: - "${RENDER_GID:-107}" # --- NVIDIA GPU (NVENC) --- # Install the NVIDIA Container Toolkit on the host, then add the reservation below AND # the two NVIDIA_* environment variables to the optimisarr service above. No /dev/dri or # group_add is needed for NVENC. # # IMPORTANT: NVIDIA_DRIVER_CAPABILITIES must include "video" — without it the NVENC # library (libnvidia-encode.so) is not injected and hardware encoding fails with # "Cannot load libnvidia-encode.so.1" even though nvidia-smi works. The plain `--gpus all` # default only grants "compute,utility". # # environment: # NVIDIA_VISIBLE_DEVICES: "all" # NVIDIA_DRIVER_CAPABILITIES: "compute,video,utility" # # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu]