Jellyfin Forum
Newbie in need of help for backup - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: Newbie in need of help for backup (/t-newbie-in-need-of-help-for-backup)

Pages: 1 2 3 4


RE: Newbie in need of help for backup - pol77 - 2024-06-18

Changed config to this:

Code:
version: "3.9"
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: PolFlix
    user: 1000:1000
    network_mode: "host"
devices:
    - /dev/nvidia0:/dev/nvidia0
    - /dev/nvidiactl:/dev/nvidiactl
      /dev/nvidia-uvm:/dev/nvidia-uvm
environment:
      - VERSION=docker
      - PATH=/usr/local/cuda/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      - NVIDIA_VISIBLE_DEVICES=all
      - NVIDIA_DRIVER_CAPABILITIES=all
ports:
      - 32666:8096
      - 32667:8920
volumes:
    - /Container/jellyfin/config:/config
    - /Container/jellyfin/cache:/cache
    - /Storage/Movies:/Movies:ro
deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities:
                - gpu
restart: unless-stopped


Same error message...


RE: Newbie in need of help for backup - TheDreadPirate - 2024-06-18

If this is an accurate copy and paste, you missed a dash on this line.

Code:
/dev/nvidia-uvm:/dev/nvidia-uvm



RE: Newbie in need of help for backup - pol77 - 2024-06-18

It is and thank you. Dash added but the validation error remains.

I have also followed your advice and created an account at the qnap forum and posted the following:


Hi all.

First off, I'm a total newbie to qnas, linux, containers, yaml and Jellyfin. So, please excuse the ignorance.

I have managed to sucessfully run a container for a jellyfin server, which I created using the GUI. I quickly realized that I need a GPU so I purchased and installed a Quadro P1000.

I installed the driver in the App Center and set it to container station mode.

When I run this command:
Code:
/sbin/getcfg NVIDIA_GPU_DRV Install_Path -f /etc/config/qpkg.conf -d None


In the QNAP SSH I get the response:
Code:
/share/ZFS530_DATA/.qpkg/NVIDIA_GPU_DRV


But if I run it in the container terminal, I get:
Code:
bash: /sbin/getcfg: No such file or directory


Is there a way to correct what is needed in my current Jellyfin container to get the GPU working in it?


I have also tried the YAML approach.

This is what I have so far:
Code:
version: "3.9"[/color]
[color=#0074d9]services:[/color]
[color=#0074d9]  jellyfin:[/color]
[color=#0074d9]    image: jellyfin/jellyfin[/color]
[color=#0074d9]    container_name: PolFlix[/color]
[color=#0074d9]    user: 1000:1000[/color]
[color=#0074d9]    network_mode: "host"[/color]
[color=#0074d9]devices:[/color]
[color=#0074d9]    - /dev/nvidia0:/dev/nvidia0[/color]
[color=#0074d9]    - /dev/nvidiactl:/dev/nvidiactl[/color]
[color=#0074d9]      /dev/nvidia-uvm:/dev/nvidia-uvm[/color]
[color=#0074d9]environment:[/color]
[color=#0074d9]      - VERSION=docker[/color]
[color=#0074d9]      - PATH=/usr/local/cuda/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin[/color]
[color=#0074d9]      - NVIDIA_VISIBLE_DEVICES=all[/color]
[color=#0074d9]      - NVIDIA_DRIVER_CAPABILITIES=all[/color]
[color=#0074d9]ports:[/color]
[color=#0074d9]      - 32666:8096[/color]
[color=#0074d9]      - 32667:8920[/color]
[color=#0074d9]volumes:[/color]
[color=#0074d9]    - /Container/jellyfin/config:/config[/color]
[color=#0074d9]    - /Container/jellyfin/cache:/cache[/color]
[color=#0074d9]    - /Storage/Movies:/Movies:ro[/color]
[color=#0074d9]deploy:[/color]
[color=#0074d9]      resources:[/color]
[color=#0074d9]        reservations:[/color]
[color=#0074d9]          devices:[/color]
[color=#0074d9]            - driver: nvidia[/color]
[color=#0074d9]              count: all[/color]
[color=#0074d9]              capabilities:[/color]
[color=#0074d9]                - gpu[/color]
[color=#0074d9]restart: unless-stopped


When I try to validate it, I get the error message:
Code:
Invalid Compose YAML Code[/color]
[color=#0074d9]validate compose config failed: operateApp action [convert] failed: exit status 15: volumes must be a mapping


Any help with either getting my current container to utilize my GPU or creating a yaml code to make a new container that does, will be greatly appreciated.

I will let you know if they have any helpful informaiton.


RE: Newbie in need of help for backup - pol77 - 2024-06-19

Good morninig from London, captain...

A few updates...
- The QNAP Forum has not responded.
- I am still unable to figure out what I'm doing wrong in the yaml configuration.
- I have found the way to pass through the GPU to the container via GUI and nvidia-smi is reporting the driver in the container terminal.
- When I enable hardware transcoding in Jellyfin, playback fails.
- The logs show that Jellyfin requires nvidia driver version 520.56.06 or newer while QNAP is only offering up to 515.48.07.
- I don't think there is a way to manually install a newer nvidia driver in the QNAP NAS.

Thank you for your help so far, I've learned loads. I still want to understand yaml configuration and how to do it right but it seems that I will not be enjoying Jellyfin on my QNAP NAS, at least until they relese a newer driver.

EDIT: Do you know if there is a container with an earlier version of Jellyfin that supports transcoding with my version of Nvidia driver?


RE: Newbie in need of help for backup - TheDreadPirate - 2024-06-19

You'd have to run Jellyfin 10.8.X. The minimum Nvidia driver requirement was....470? Something like that. Low enough that the 515 driver available to you is fine.


RE: Newbie in need of help for backup - pol77 - 2024-06-19

Thank you...

The million dollar question is, will my config backup from the latest version work on 10.0.X?


RE: Newbie in need of help for backup - TheDreadPirate - 2024-06-19

Negatory. Upgrading to 10.9 is one way. If you have a backup pre-10.9 you could restore to that. Otherwise you're starting over.


RE: Newbie in need of help for backup - Efficient_Good_5784 - 2024-06-19

(2024-06-19, 03:47 PM)pol77 Wrote: Thank you...

The million dollar question is, will my config backup from the latest version work on 10.0.X?
No (or maybe mostly not). There were changes to the database and other files for v10.9 that will break if reverting back to older releases.

This isn't the first time something like this happened when a new Jellyfin version was released.


RE: Newbie in need of help for backup - pol77 - 2024-06-19

Huge bummer... I started on 10.9... New at this... A couple of days' work to prepare my metadata... Oh well...

In the meantime, I tried 10.8.9AMD and did not work for me. I get this error message:

Failed to create container "PolFlix-GPU-10.8.9AMD-dup". Error message: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #1: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown

I did not have this issue on the latest version, which loaded the nvidia files without a problem. Same settings.
Is it something that must be done manually on 10.8.X and was automated on 10.9?


RE: Newbie in need of help for backup - pol77 - 2024-06-19

OK guys... Major breakthrough and I'm very excited.

The positive:
I have resolved my composer issues - it was just formatting as I'm totally ignorant. I can now create the container fine.
I have managed to script a container and it worked with version 10.8.9 and I did hardware transcoding with my GPU!!!

The negative:
I still have one issue to resolve. The drive mapping for config and cache to my shared folders in the NAS seem to be read only and the container starts and stops... The only way I was able to get it to run as above was to remove the cache and config mappings and allow it to create the folders inside the container, which is not ideal as it makes it very annoying to backup and restore.

The ugly:
Obviously, after all the issues re resolved I will have to spend a couple of very tedious days to fix my metadata (again).

Here is my composer file:

Code:
version: '3'
services:
    jellyfin:
        image: jellyfin/jellyfin:10.8.9
        container_name: PolFlix
        user: '1000:1000'
        network_mode: host
        environment:
            - VERSION=docker
            - LD_LIBRARY_PATH=/share/ZFS530_DATA/.qpkg/NVIDIA_GPU_DRV/usr:/usr/local/nvidia/lib
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=all
        ports:
            - '32666:8096'
            - '32667:8920'
        volumes:
            - '/share/Container/jellyfin/config:/config'
            - '/share/Container/jellyfin/cache:/cache'
            - '/share/Storage/Movies:/Movies:ro'
            - '/opt/NVIDIA_GPU_DRV/usr:/usr/local/nvidia:ro'
        devices:
            - '/dev/nvidia0:/dev/nvidia0'
            - '/dev/nvidiactl:/dev/nvidiactl'
            - '/dev/nvidia-uvm:/dev/nvidia-uvm'
        restart: unless-stopped


If you guys can see why the created cache and config folders seem to be read only I would be obliged. My buess is that the mapping needs to be a bind, but I don't know the code for that. It worked as a bind when I was doing it through th eGUI.

Edit:

FOUND IT.

This is the code that worked.

Code:
version: '3'
services:
    jellyfin:
        image: jellyfin/jellyfin:10.8.9
        container_name: PolFlix
        user: '1000:1000'
        network_mode: host
        environment:
            - VERSION=docker
            - LD_LIBRARY_PATH=/share/ZFS530_DATA/.qpkg/NVIDIA_GPU_DRV/usr:/usr/local/nvidia/lib
            - NVIDIA_VISIBLE_DEVICES=all
            - NVIDIA_DRIVER_CAPABILITIES=all
        ports:
            - '32666:8096'
            - '32667:8920'
        volumes:
            -  type: bind
                source: /share/Container/jellyfin/config
                target: /config
            -  type: bind
                source: /share/Container/jellyfin/cache
                target: /cache
            - '/share/Storage/Movies:/Movies:ro'
            - '/opt/NVIDIA_GPU_DRV/usr:/usr/local/nvidia:ro'
        devices:
            - '/dev/nvidia0:/dev/nvidia0'
            - '/dev/nvidiactl:/dev/nvidiactl'
            - '/dev/nvidia-uvm:/dev/nvidia-uvm'
        restart: unless-stopped

The only thing that did not seem to work is that I was expecting to be able to access the UI at port 32666 but it seems I can access it at 8096, which is weird but I don't care. It is all working and it is thanks to your help!

A million thank yous and I hope other people will see this thread and get help if they are facing the same issue.

I have also opened a case with QNAP and asked them to update the nvidia drivers! We'll see how that goes.