Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💡 Guide on getting HW acceleration working #302

Open
1 task done
djtecha opened this issue Feb 14, 2024 · 3 comments
Open
1 task done

💡 Guide on getting HW acceleration working #302

djtecha opened this issue Feb 14, 2024 · 3 comments
Labels
type: enhancement Categorizes issue or PR as related to a new feature.

Comments

@djtecha
Copy link

djtecha commented Feb 14, 2024

How these charts can be improved?

Hello,
I was wondering if there's any documentation on getting hw trans-coding working with this cart? Trying to follow this guide and translate it to your chart: https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/

Looks like I have the DRI device mounted but it fails to initialize. The device on the hows has group access for render and that group id is 104

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: jellyfin
  namespace: media
spec:
  interval: 30m
  chart:
    spec:
      chart: jellyfin
      version: "2.3.0"
      sourceRef:
        kind: HelmRepository
        name: beluga-cloud
        namespace: cluster-config
  values:
    podSecurityContext:
      runAsNonRoot: true
      fsGroup: 911
      seccompProfile:
        type: RuntimeDefault
      runAsUser: 911
      runAsGroup: 911
      supplementalGroups:
        - 104
    containerSecurityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
          - ALL
      readOnlyRootFilesystem: true
      runAsNonRoot: true
      runAsUser: 911
      runAsGroup: 911
      supplementalGroups:
        - 104
    jellyfin:
      extraDevices:
        - /dev/dri/renderD128

Code of Conduct

  • I agree to follow this project's Code of Conduct
@djtecha djtecha added the type: enhancement Categorizes issue or PR as related to a new feature. label Feb 14, 2024
@djtecha
Copy link
Author

djtecha commented Feb 14, 2024

Figured it out. For those that get stuck this worked for me. Where user 911 is my jellyfin user.

    podSecurityContext:
      runAsNonRoot: false
      fsGroup: 911
      seccompProfile:
        type: RuntimeDefault
      runAsUser: 911
      runAsGroup: 911
      supplementalGroups:
        - 104
    containerSecurityContext:
      privileged: true
      allowPrivilegeEscalation: true
      capabilities:
        drop:
          - ALL
      readOnlyRootFilesystem: true
      runAsNonRoot: false
      runAsUser: 911
      runAsGroup: 911

@djjudas21
Copy link

Thanks for the pointers, @djtecha. I got this working on my cluster by specifying the uid as 64710, which is the default in the helm chart.

I also specified the GPU as a requestable resource, to make sure the pod gets scheduled on a node with a GPU - and that other GPU workloads will be scheduled on a different node. The GPU must be specified in requests and limits.

resources:
  jellyfin:
    requests:
      cpu: 500m
      memory: 512Mi
      gpu.intel.com/i915: "1"
    limits:
      cpu: '4'
      memory: 6Gi
      gpu.intel.com/i915: "1"

(yes, I know Intel i915 is ancient, lol)

I'm planning a blog post on how I set up the device allocation, but basically it's using node-feature-discovery, intel-device-plugins-operator and intel-device-plugins-gpu

@xunleii
Copy link
Contributor

xunleii commented Apr 20, 2024

Hi folks, thank you for this discussion and for your replies.

To be honest, I didn't have enough time for this project and so it's largely abandoned (as you can see on MR Rénover). However, if anyone wants to add anything to the document, please feel free.

However, I'll probably remove this repo from https://artifacthub.io/ soon and put this repo in RO mode (even if, for Actual Budget, this repo seems to be the most viewed one).

@djtecha Thanks for you response
@djjudas21 I didn't know about applications with GPU, thanks!

@djjudas21 djjudas21 mentioned this issue Jun 10, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants