Passer au contenu principal

Jellyfin avec transcodage matériel NVIDIA

  1. Installation de la boîte à outils NVIDIA Container

  2. Faire un point de montage d'un partage de stockage réseau sur l'hôte, si ce n'est pas un NAS, en modifiant le fichier fstab sur Debian ou Ubuntu serveur avec les commandes :

sudo -i
nano /etc/fstab
192.168.0.187:/mnt/media/multimedia /mnt/nas_multimedia/ nfs defaults,nofail 0 0
apt install -y nfs-common && systemctl daemon-reload && mkdir /mnt/nas_multimedia/ && mount -a
exit
  1. Crée un volume pour le conteneur :
docker volume create jellyfin_config
services:
  jellyfin:
    image: 'linuxserver/jellyfin'
    container_name: 'Jellyfin'
    network_mode: 'bridge'
    restart: 'unless-stopped'
    hostname: 'Jellyfin'
    environment:
      TZ: 'Europe/Zurich'
      PUID: '0'
      PGID: '0'
      JELLYFIN_PublishedServerUrl: '0.0.0.0'
      NVIDIA_DRIVER_CAPABILITIES: 'all'
      NVIDIA_VISIBLE_DEVICES: 'all'
    deploy:
      resources:
        limits:
          cpus: '2.00'
          memory: '4096M'1024M'
        reservations:
          cpus: '0.02'
          memory: '256M'
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    volumes:
      - 'jellyfin_config:/config'
      - 'jellyfin_cache:/cache'
      - '/mnt/nas_multimedia/Films:/films'
      - '/mnt/nas_multimedia/Séries:/tv_shows'
    ports:
      - '8096:8096'
networks:
  jellyfin_network:
    driver: bridge
volumes:
  jellyfin_config:
    external: true
  jellyfin_cache:
    external: true

Voir les sessions d'encodage sur l'hôte :

nvidia-smi encodersessions

Pour voir l'utilisation en temps réelle :

nvidia-smi dmon

Documentation : https://hub.docker.com/r/linuxserver/jellyfin