Jump to content

Can't get HW Transcoding working in Docker with Nvidia


Jackal83

Recommended Posts

Jackal83

I followed the instructions in Topic https://emby.media/community/index.php?/topic/76937-docker-hwa-nvidia-instructions/ but i just can't get HW transcoding working in Emby Docker (official).

I have two other Docker containers in which the GPU passthrough is working, Tdarr and Jellyfin.

What is missing? What am I doing wrong?

my nvidia-smi output:

image.png.8f78279416fc82419c078ba2286c8695.png

 

Logs are attached

embyserver.txt hardware_detection-63729483026.txt

Link to comment
Share on other sites

Jackal83

I used this:

 

docker run --name emby-server -d \
 --volume /srv/dev-disk-by-label-ssd2/config/emby:/config \
 --volume /srv/dev-disk-by-label-ssd2/appdata/emby:/appdata \
 --volume /srv/61ded521-e5d5-463a-8546-c32e97278133/media:/media \
 --net=host \
 -e UID=1000 \
 -e GID=100 \
 --restart=unless-stopped \
 --runtime=nvidia \
 --env NVIDIA_VISIBLE_DEVICES=all \
 --env NVIDIA_DRIVER_CAPABILITIES=all \
 emby/embyserver:latest

 

Link to comment
Share on other sites

  • 2 weeks later...
Jackal83

sadly no. Tried few different parameters like "--gpus all" and changing "--runtime" but always the same outcome.

what do the errors in the hardware detect log mean? especially these:

"Error": {
        "Number": -1,
        "Message": "Operation not permitted"
    },
    "Log": [
        {
            "Level": 16,
            "Category": 0,
            "Message": "Cannot load libcuda.so.1"
        },
        {
            "Level": 16,
            "Category": 0,
            "Message": "Error loading CUDA functions"
        }

 

What permissions are missing? i know the libcuda.so.1 is present

Link to comment
Share on other sites

wedgekc

I'm not familiar with the NVIDIA pass through to docker procedure but when I upgraded to Ubuntu 20.04 hardware transcoding would not work with the same docker run command I used in 18.04.  I had to add a second GID to get it to work.  Try adding both numbers to GIDLIST from the following commands:

getent group video | cut -d: -f3

getent group render | cut -d: -f3

Something like "--env GIDLIST=44,109"

Again, not sure what version of Linux you are running or about NVIDIA but I didn't have any hardware transcoding options without adding the second GID.

Link to comment
Share on other sites

Jackal83
17 hours ago, Cthalpa said:

Did you install the cuda drivers for linux?

I think you forgot this

nvidia-smi says CUDA Version 10.2. I even tried installing them again, no luck

 

10 hours ago, wedgekc said:

I'm not familiar with the NVIDIA pass through to docker procedure but when I upgraded to Ubuntu 20.04 hardware transcoding would not work with the same docker run command I used in 18.04.  I had to add a second GID to get it to work.  Try adding both numbers to GIDLIST from the following commands:

getent group video | cut -d: -f3

getent group render | cut -d: -f3

Something like "--env GIDLIST=44,109"

Again, not sure what version of Linux you are running or about NVIDIA but I didn't have any hardware transcoding options without adding the second GID.

tried that, didn't work either. I'm running OMV5 with Debian 10 (Buster)

Link to comment
Share on other sites

Cthalpa

The only suggestion i have for you is to install ubuntu-drivers-common and do ubuntu-drivers autoinstall

Link to comment
Share on other sites

Jackal83

I finally got HW transcoding working, although in the end I didn't use the official Docker container, I used the linuxserver.io container.

Before that I tried installing the nvidia drivers from the official Debian repository but that caused more problems and went back to the nvidia provided drivers.

 

Link to comment
Share on other sites

On 7/23/2020 at 10:41 AM, Jackal83 said:

I finally got HW transcoding working, although in the end I didn't use the official Docker container, I used the linuxserver.io container.

Before that I tried installing the nvidia drivers from the official Debian repository but that caused more problems and went back to the nvidia provided drivers.

 

How did you configure it?

Link to comment
Share on other sites

Jackal83
57 minutes ago, Luke said:

How did you configure it?

pretty much the same as in my second post. I changed the name and the image. I didn't use the GIDLIST

Link to comment
Share on other sites

Thanks for the info. That's strange as so many have had success with the instructions in the other pinned posting.

Link to comment
Share on other sites

  • 8 months later...
EODCrafter

Did something break? This was working and I just checked and it's not now. I followed the tutorial for this docker create file....

Tutorial

sudo docker container create \
--name="emby-server" \
--network="host" \
--volume /opt/docker/volumes/emby/config:/config \
--volume /mnt/media:/mnt/media \
--device /dev/dri:/dev/dri \
--runtime=nvidia \
--env UID=997 \
--env GID=997 \
--env GIDLIST=997 \
--env NVIDIA_VISIBLE_DEVICES=all \
--env NVIDIA_DRIVER_CAPABILITIES=compute,utility,video \
emby/embyserver:latest

 

Capture.PNG

_emby-server_logs.txt

@softworkz

 

 

Capture.PNG

hardware_detection-63754180806.txt

Edited by EODCrafter
Link to comment
Share on other sites

2 hours ago, EODCrafter said:

Did something break? This was working and I just checked and it's not now. I followed the tutorial for this docker create file....

Tutorial


sudo docker container create \
--name="emby-server" \
--network="host" \
--volume /opt/docker/volumes/emby/config:/config \
--volume /mnt/media:/mnt/media \
--device /dev/dri:/dev/dri \
--runtime=nvidia \
--env UID=997 \
--env GID=997 \
--env GIDLIST=997 \
--env NVIDIA_VISIBLE_DEVICES=all \
--env NVIDIA_DRIVER_CAPABILITIES=compute,utility,video \
emby/embyserver:latest

 

Capture.PNG

_emby-server_logs.txt 10.15 kB · 0 downloads

@softworkz

 

 

Capture.PNG

hardware_detection-63754180806.txt 123.01 kB · 0 downloads

The minimum cuda version has gone up to accommodate new features. I would ensure you have the latest drivers installed.

Link to comment
Share on other sites

EODCrafter
47 minutes ago, Luke said:

The minimum cuda version has gone up to accommodate new features. I would ensure you have the latest drivers installed.

It's fully updated in Ubuntu 18.04...Don't want 20.04 or whatever the new one is :(

image.png.6f6fd3eab1a07d2b98b4b39e9e520252.png

Edited by EODCrafter
Link to comment
Share on other sites

I don't want to disturb everybody being happy and satisfied already, but for clarity and future readers:

  • CUDA 11.x is not a requirement. The current minimum is CUDA 8.2
    The minimum required driver versions for this are:
    • Linux: 396.24 or newer
    • Windows: 397.93 or newer
  • You never need to install the CUDA Toolkit!
    That multi-Gigabyte download is for developers only
  • The installation instructions are always the same (like documented in the KB):
    • Go to nvidia.com
    • Go to driver download 
    • Follow the instructions

 

Always follow the instructions on the Nvidia site, even when the installed driver version appears to be sufficient!
Many Linux distributions include a subset of the Nvidia drivers only (e.g. without CUDA), so you cannot judge by the driver version only.

Link to comment
Share on other sites

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...