Jump to content

Emby Docker Not Detecting Nvidia GPU for Transcoding


Recommended Posts

linkwellfook
Posted

Hi,

The docker version of Emby does not detct my RTX 3070 for h/w transcoding

My setup

Ubuntu 24.04

64 GB Ram

Ryzen 9 CPU

Running nvidia-smi

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.163.01             Driver Version: 550.163.01     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3070        Off |   00000000:0D:00.0  On |                  N/A |
| 45%   60C    P2             49W /  220W |     362MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A   2449886      C   /usr/lib/ffmpeg/7.0/bin/ffmpeg                175MiB |
|    0   N/A  N/A   2526651      C   /usr/lib/ffmpeg/7.0/bin/ffmpeg                177MiB |
+-----------------------------------------------------------------------------------------+

 

 cat /sys/module/nvidia/version
550.163.01

 cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  550.163.01  Tue Apr  8 12:41:17 UTC 2025
GCC version:  gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04)

 

From within emby docker

cat /sys/module/nvidia/version
550.163.01

cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  550.163.01  Tue Apr  8 12:41:17 UTC 2025
GCC version:  gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04) 

Files included

Embyserver logs

embyserver docker compose file

 

embyserver.txt emby.yml

yocker
Posted

Have you remembered the -runtime Nvidia ? I think that's how it's supposed to be

linkwellfook
Posted

Hi,

 

Yeap.  It's in the docker compose file.

runtime: nvidia

Posted

HI, are you able to install our native package directly on the host machine to see how that compares?

linkwellfook
Posted

Hi,

 

Will do.  I'm about to step out so it will be the following day before I get to do this.

  • Thanks 1
linkwellfook
Posted

Hi,

I've installed the native package onto the host machine (same machine hosts the docker version) and I see the hw encoders and decoders.

guunter
Posted

Btw you don't need these line in your compose if youre using an nvidia GPU.   

devices:
      - /dev/dri:/dev/dri
      #- /dev/dri/card0:/dev/dri/card0
      - /dev/dri/renderD128:/dev/dri/renderD128

 

linkwellfook
Posted

Removing devices section did nothing.  If anything it broke emby in docker

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Why do I get the feeling I should have adhered to the old mantera If its not broke don't fix it.

when I run locate libpthread.so.0 from the host I get

/snap/core20/2582/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core20/2582/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/core20/2599/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core20/2599/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/core22/1981/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core22/1981/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/core22/2010/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core22/2010/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/snapd/24718/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/snapd/24792/usr/lib/x86_64-linux-gnu/libpthread.so.0
/usr/lib/i386-linux-gnu/libpthread.so.0
/usr/lib/x86_64-linux-gnu/libpthread.so.0
/usr/lib32/libpthread.so.0

I can still launch native emby

Posted
5 hours ago, linkwellfook said:

Removing devices section did nothing.  If anything it broke emby in docker

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Why do I get the feeling I should have adhered to the old mantera If its not broke don't fix it.

when I run locate libpthread.so.0 from the host I get

/snap/core20/2582/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core20/2582/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/core20/2599/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core20/2599/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/core22/1981/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core22/1981/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/core22/2010/usr/lib/i386-linux-gnu/libpthread.so.0
/snap/core22/2010/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/snapd/24718/usr/lib/x86_64-linux-gnu/libpthread.so.0
/snap/snapd/24792/usr/lib/x86_64-linux-gnu/libpthread.so.0
/usr/lib/i386-linux-gnu/libpthread.so.0
/usr/lib/x86_64-linux-gnu/libpthread.so.0
/usr/lib32/libpthread.so.0

I can still launch native emby

Did you install the nvidia toolkit? The runtime: nvidia does nothing without it.

linkwellfook
Posted

Yes,  as shown when using the commands on the host:

nvidia-smi

cat /sys/module/nvidia/version

cat /proc/driver/nvidia/version

I've included the results when I created the post.

Posted (edited)
26 minutes ago, linkwellfook said:

Yes,  as shown when using the commands on the host:

nvidia-smi

cat /sys/module/nvidia/version

cat /proc/driver/nvidia/version

I've included the results when I created the post.

That is the nvidia driver not the toolkit. It's a separate install. https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html.

 

If you do the command below do you get an output?

which nvidia-container-toolkit

 

Edited by guunter
linkwellfook
Posted

hi

Results from 

which nvidia-container-toolkit

from the host

/usr/bin/nvidia-container-toolkit

 

Posted
17 minutes ago, linkwellfook said:

hi

Results from 

which nvidia-container-toolkit

from the host

/usr/bin/nvidia-container-toolkit

 

Looks like you have everything in place. Alternatively did you try using linuxserver docker image? I use that with my emby. You should be able to just change the volumes and it'll start up or just point it to a new config volume for testing.

 

services:
  emby:
    image: lscr.io/linuxserver/emby:latest
    container_name: emby
    runtime: nvidia
    environment:
      - PUID=1003
      - PGID=1003
      - TZ=America/Los_Angeles
      - NVIDIA_VISIBLE_DEVICES=all
    volumes:
      - /opt/appdata/emby:/config
      - /mnt/nas/media/:/mnt/nas/media
      - /dev/shm:/transcoding
    ports:
      - 8096:8096
      - 8920:8920 #optional
    restart: unless-stopped

 

Neminem
Posted

@guunterare you using RAM drive as your transcode drive ?

linkwellfook
Posted

Hi,

no, using a 256 ssd

  • Like 1
Posted
9 minutes ago, Neminem said:

@guunterare you using RAM drive as your transcode drive ?

Yes I am. 256gb of ram 😅. No live tv.

  • Like 1
Neminem
Posted (edited)

Ok that's why 👍.

I tried once and that failed because of a run away live tv stream 😁

Someone watching le-man race.

Only have 64GB RAM and shm taking 32GB but not enough in that use case 🤣😂

Edited by Neminem
linkwellfook
Posted

Hi

 

Here's the revised compose file

services:
  emby:
    #image: ysx88/embyserver:latest
    image: lscr.io/linuxserver/emby:latest
    container_name: embyserver
    runtime: nvidia
    environment:
      - UID=998 # The UID to run emby as (default: 2)
      - GID=995 # The GID to run emby as (default 2)
      - GIDLIST=44,108 # A comma-separated list of additional GIDs to run emby as (default: 2)
      - NVIDIA_VISIBLE_DEVICES=all
      #- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
    #network_mode: "service:gluetun"
    volumes:
      - "$DOCKERDIRDATADIR/emby/programdata:/config" # Configuration directory
      - "$MEDIADIR:/media" # Media directory
      - "$MUSIC:/music" # Media directory
      - "/dev/shm:/transcoding"
    ports:
      - 8096:8096 # HTTP port
      - 8920:8920 # HTTPS port#
    shm_size: "6gb"#
    restart: on-failure

I removed the lines 

- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video

deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

and
    devices:
      - /dev/dri:/dev/dri
      - /dev/dri/card1:/dev/dri/card1
      - /dev/dri/renderD128:/dev/dri/renderD128

I still get

**** adding /dev/dri/renderD128 to video group root with id 0 ****

**** permissions for /dev/dri/card1 are good ****

[custom-init] No custom files found, skipping...

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

Regards

 

Posted (edited)
13 minutes ago, linkwellfook said:

Hi

 

Here's the revised compose file

services:
  emby:
    #image: ysx88/embyserver:latest
    image: lscr.io/linuxserver/emby:latest
    container_name: embyserver
    runtime: nvidia
    environment:
      - UID=998 # The UID to run emby as (default: 2)
      - GID=995 # The GID to run emby as (default 2)
      - GIDLIST=44,108 # A comma-separated list of additional GIDs to run emby as (default: 2)
      - NVIDIA_VISIBLE_DEVICES=all
      #- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
    #network_mode: "service:gluetun"
    volumes:
      - "$DOCKERDIRDATADIR/emby/programdata:/config" # Configuration directory
      - "$MEDIADIR:/media" # Media directory
      - "$MUSIC:/music" # Media directory
      - "/dev/shm:/transcoding"
    ports:
      - 8096:8096 # HTTP port
      - 8920:8920 # HTTPS port#
    shm_size: "6gb"#
    restart: on-failure

I removed the lines 

- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video

deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

and
    devices:
      - /dev/dri:/dev/dri
      - /dev/dri/card1:/dev/dri/card1
      - /dev/dri/renderD128:/dev/dri/renderD128

I still get

**** adding /dev/dri/renderD128 to video group root with id 0 ****

**** permissions for /dev/dri/card1 are good ****

[custom-init] No custom files found, skipping...

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

Regards

 

I'm at a loss you seem to have it all set right. Did you install docker via apt or snap?

Edited by guunter
linkwellfook
Posted

Hi

A quick recap

When I first opened this discussion emby was running however I could not use GPU transcoding.

It works if I use the native app.

No matter if I use my original compose modified or use a different image I get the above output.

Regarding docker.  It was installed using apt from dockers repo

Posted (edited)
7 minutes ago, linkwellfook said:

Hi

A quick recap

When I first opened this discussion emby was running however I could not use GPU transcoding.

It works if I use the native app.

No matter if I use my original compose modified or use a different image I get the above output.

Regarding docker.  It was installed using apt from dockers repo

If you go to the emby docer config folder location on your host are the permissions set correctly? 

This error makes it seem like a permission issue . Just trying to throw out troubleshooting ideas.

/app/emby/system/EmbyServer: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

 

Edited by guunter
linkwellfook
Posted

Hi, yeah

the permissions are correct.

My user name has rw access to emby config folder

My user name is a member of docker and emby group.

 

Please note I will be away for a couple of days with limited internet access.

Posted

Is your emby docker setup all the way? If its a brand new install i'd just blast the config folder and start new with the linuxserver.io image.The Linuxserver and official image aren't the same. Alternatively you can make a copy of your standard emby and point your docker config volume to the copy. That way you don't have to make a whole new server from scratch. Just be sure to turn off the standard install server first.

  • 2 weeks later...
linkwellfook
Posted

Hi guunter,

I'll nuke the config and try linuxserver image.

Posted
12 hours ago, linkwellfook said:

Hi guunter,

I'll nuke the config and try linuxserver image.

Sounds good. I hope it works out for you! Linuxserver includes extra packages in their image to help with gpu compatibility.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...