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

Hello TheDreadPirate...

My journey into the rabithole continues but I think I have dived deeper than my current abilities.

I am successfulyl running the Jellyfin container server on my QNAP TS-873A and I have mapped the required folders on my Shared drive, so I can backup and restore the configuration successfully, thanks to your pointers and some research.

I quickly found out that I need a GPU to transcode if I am to have any actual use for the Jellyfin server and installed a Quadro P1000 which has been recognized, drivers installed and set to Container mode so it can be used by the QNAP container station.

After this point, I have found many conflicting guides and linux commands that do not seem to correspond to my situation.

Is it possible to configure my existing container to use the GPU or do I need to make a fresh installation? If I need a fresh installation, what do I need to add / do differently in order for it to use the GPU.

Many thanks!


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

Read this github comment. Let us know if their solution worked for you.

https://github.com/jellyfin/jellyfin/issues/9806#issuecomment-1562694110


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

I already tried this, before coming here to request help. I installed vim, as instructed but that is as far as I could progress with the solution as there is no nvidia folder inside /usr/local. That is for both the QNAP environment and the container.

I tried restarting my qnap in case it was needed, after the card and driver installation but it made no difference.


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

In the comment above the one I linked, it mentioned the need to install Nvidia drivers from QNAPs app store. Not sure if you've done that part yet. And the steps in the solution seemed reliant on that happening first.

But, honestly, this may be better to ask on QNAPs forum. This isn't a Jellyfin specific question at its core. It's a "how do I pass my Nvidia GPU into a container on QNAP" question. There are not a lot of QNAP users, and even fewer experts, on this forum.


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

I understand. I have already installed the Nvidia driver on QNAP and set it to be passed through to the container station. There is a possibility I might need to install the driver inside the container as well, but this is the point where I'm not sure if I need to do that or how to do it.


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

You should NOT need to install inside the container. The way it works in plain docker is that you pass the device(s) in to the container and then configure docker to pass in the Nvidia runtimes.

Code:
version: '3'
services:
  jellyfin:
    image: jellyfin/jellyfin
    user: 1000:1000
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: [gpu]
    network_mode: 'host'
    volumes:
      - /path/to/config:/config
      - /path/to/cache:/cache
      - /path/to/media:/media

I just don't know how to do the same with QNAP.


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

OK, I understand we need to set some environment variable to do that.

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

inside the QNAP SSH environment I get:
/share/ZFS530_DATA/.qpkg/NVIDIA_GPU_DRV

But inside the container I get:
bash: /sbin/getcfg: No such file or directory

Therefore I believe that the container does not have access to the Nvidia drivers because the requiret environment variable was not inserted when the container was created.

Is there a way to add the required environment entry to the container or do I need to create a new container and add the environment variable during the creation?


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

You should be able to make changes to the container without recreating it. That would be nuts if you couldn't.

But a lot of your questions would be best asked over at https://forum.qnap.com/. I don't have the answers.


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

Thank you very much!
I have registered on the QNAP forum.

When I created the container I used the QNAP Container Station GUI, but now I'm ttrying to make a yaml file configuration, such as the one you included above...

This is what I have so far, that may work, according to various sources online:

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:
      - type: bind
        source: /Container/jellyfin/config
        target: /config
      - type: bind
        source: /Container/jellyfin/cache
        target: /cache
      - type: bind
        source: /Storage/Movies
        target: /Movies
        read_only: true
deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities:
                - gpu
restart: unless-stopped

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

I also tried the volumes part like this:
Code:
volumes:
      - /Container/jellyfin/config:/config
      - /Container/jellyfin/cache:/cache
      - /Storage/Movies:/Movies:ro
But I got the same error.

I guess I need to map the volumes with a different command. Any ideas?


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

Instead of a bind mount, just do a standard volume mount. An example from my docker.

Code:
volumes:
      - ./jellyfin-data/config:/config
      - ./jellyfin-data/cache:/cache
      - /media/library:/media/library:ro
      - /media/storage2:/media/testLibrary:ro