services:
  plex:
    container_name: plex
    image: plexinc/pms-docker:latest
    restart: unless-stopped
    network_mode: host
    #runtime: nvidia
    environment:
      - TZ=US
      - VERSION=latest
        #- PLEX_CLAIM=claim-MTdwY-AT5KdnTMp7KfU3
      - PUID=1000
      - PGID=1000
      #- NVIDIA_VISIBLE_DEVICES=all
      #- NVIDIA_DRIVER_CAPABILITIES=all
      - TRANSCODE_OPERATING_MODE=ram
    cpus: "4.0"
    mem_limit: "12288m"
    mem_reservation: "4096m"
    ulimits:
      nproc: 65535
      nofile:
        soft: 65535
        hard: 65535
    volumes:
      - /docker/mediaservices/plex:/config
      - /pool/tv/library:/mnt/tv
      - /pool/movies/library:/mnt/movies
      - /pool/music/library:/mnt/music
      - /dev/shm:/trasncode
