SI ce n’est pas déjà fait, il faut installer docker.io et docker-compose avant d’installer Tdarr :
$ sudo apt install docker.io docker-compose -y
Si vous rencontrez l’erreur :
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
containerd.io : Conflicts: containerd
Conflicts: runc
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Il faut supprimer containerd avant d’installer docker.io :
$ sudo apt-get remove containerd.io
$ sudo apt install docker.io docker-compose -y
$ sudo systemctl start docker
$ sudo gpasswd -a $USER docker
Puis composer le fichier docker-compose.yml :
version: "3.4"
services:
tdarr:
container_name: tdarr
image: ghcr.io/haveagitgat/tdarr:latest
restart: unless-stopped
network_mode: bridge
ports:
- 8265:8265 # webUI port
- 8266:8266 # server port
environment:
- TZ=Europe/Paris
- PUID=$PUID
- PGID=$PGID
- UMASK_SET=002
- serverIP=0.0.0.0
- serverPort=8266
- webUIPort=8265
- internalNode=true
- inContainer=true
- ffmpegVersion=7
- nodeName=MyInternalNode
- auth=false
- openBrowser=true
- maxLogSizeMB=10
- cronPluginUpdate=
- NVIDIA_DRIVER_CAPABILITIES=all
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- /docker/tdarr/server:/app/server
- /docker/tdarr/configs:/app/configs
- /docker/tdarr/logs:/app/logs
- /media:/media
- /mnt:/mnt
- /transcode_cache:/temp
devices:
- /dev/dri:/dev/dri
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# node example
tdarr-node:
container_name: tdarr-node
image: ghcr.io/haveagitgat/tdarr_node:latest
restart: unless-stopped
network_mode: service:tdarr
environment:
- TZ=Europe/London
- PUID=$PUID
- PGID=$PGID
- UMASK_SET=002
- nodeName=MyExternalNode
- serverIP=0.0.0.0
- serverPort=8266
- inContainer=true
- ffmpegVersion=7
- nodeType=mapped
- priority=-1
- cronPluginUpdate=
- apiKey=
- maxLogSizeMB=10
- pollInterval=2000
- startPaused=false
- transcodegpuWorkers=1
- transcodecpuWorkers=2
- healthcheckgpuWorkers=1
- healthcheckcpuWorkers=1
- NVIDIA_DRIVER_CAPABILITIES=all
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- /docker/tdarr/configs:/app/configs
- /docker/tdarr/logs:/app/logs
- /media:/media
- /mnt:/mnt
- /transcode_cache:/temp
devices:
- /dev/dri:/dev/dri
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# Issue : https://github.com/HaveAGitGat/Tdarr/issues/610
Si vous rencontrez l’erreur suivante lors de la composition :
ERROR: for tdarr Cannot start service tdarr: error gathering device information while adding custom device "/dev/dri": no such file or directory
Il faut installer les pilotes NVIDIA :
$ curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
$ sudo apt update
$ export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.18.0-1
sudo apt-get install -y \
nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}
Puis configurer docker pour l’utiliser le pilote NVIDIA avec nvidia-ctk :
$ sudo nvidia-ctk runtime configure --runtime=docker
$ sudo systemctl restart docker

Leave a Reply