소스 검색

let plex have a GPU

Jason Playne 2 년 전
부모
커밋
3cf674b8ac
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      network/docker-compose.yml

+ 9 - 0
network/docker-compose.yml

@@ -214,6 +214,8 @@ services:
     environment:
       - PUID=65534
       - PGID=65534
+      - NVIDIA_VISIBLE_DEVICES=all
+      - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
     ports:
       - "10.10.20.254:1900:1900/udp"
       - "10.10.20.254:3005:3005/tcp"
@@ -228,6 +230,13 @@ services:
     image: ghcr.io/linuxserver/plex
     network_mode: host
     privileged: true
+    deploy:
+      resources:
+        reservations:
+          devices:
+            - driver: nvidia
+              count: 1
+              capabilities: [ gpu ]
     restart: unless-stopped
     volumes:
       - /etc/timezone:/etc/timezone:ro