Docker container gpu pass though

Server Version 4.160.0
I’m running my Plex server on a custom built pc running the latestest version of Ubuntu Server

ASRock B660M-ITX

Intel® Core™ i9-12900

ASUS Dual NVIDIA GeForce RTX 3060 V2 OC Edition 12GB GDDR6

32GB Single DDR4 3200

1 TB WD nvme drive for os

I’m running my Plex server in a docker containter. Docker and the container are fully up to date including the OS. I’m attempting to enable hardware transcoding with my GPU but can’t figure out how to configure the yaml file. below is a copy of the file directly from my server:

services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:

  • PUID=1000
  • PGID=1000
  • TZ=America/Chicago
  • VERSION=docker
  • PLEX_CLAIM=*****************************
    volumes:
  • /home/god/plex/config:/config
  • /mnt/Movies:/movies
  • /mnt/Temp_Movies:/temp_movies
  • /mnt/Tv_Shows:/tv
  • /mnt/Music:/music
  • /mnt/Music_Videos:/music_videos
    restart: unless-stopped

I have read a number of article on the web and scoured the forum here yet can’t figure it out. All the article and post I have read talk about installing an nvidia tool kit yet none of the terminal commands that I use work. They all return an error saying the package doesn’t exist. My gpu is installed and working. I can see it with the nvidia-smi command and can turn on and off the presistance memory. Any help would be greatly appreciated.

Thank you

The linuxserver Github page has info on installing the Nvidia container toolkit and additional steps to enable hardware transcoding.

been there done that doesn’t work that was one of the methods I have already tried when I add the device parameter to the yaml file to link my gpu to the plex container compose the new container image and try to restart the container the plex server is completely non functioning