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

Support for custom runtime, like nvidia-runtime for HWA video encoding #712

Closed
marsweed opened this issue Nov 25, 2022 · 9 comments
Closed
Assignees
Labels
Engineering enhancement New feature or request
Milestone

Comments

@marsweed
Copy link

CasaOS doesn't allow apps to access GPU probably bcz it doesn't support custom runtime. but when you install the same docker app outside of casaos, it works fine.

I was having problem with Unmanic not working and giving error when using NVENC for encoding. but i guess the feature might also help with HWA in apps just as Jellyfin and Plex

@tigerinus tigerinus self-assigned this Nov 25, 2022
@tigerinus tigerinus added the enhancement New feature or request label Nov 25, 2022
@tigerinus tigerinus moved this to Need Triage (QA+PM) in CasaOS Issues Nov 25, 2022
@ETWang1991 ETWang1991 moved this from Need Triage (QA+PM) to Future in CasaOS Issues Nov 29, 2022
@tigerinus
Copy link
Contributor

@marsweed - can you provide the docker command of running your app with GPU supported?

@marsweed
Copy link
Author

marsweed commented Feb 1, 2023

while am not sound enough in this stuff and if i can understand what you are asking, docker app use two types on commands to have access to GPU (came to know of second one recently) and CasaOS support none of them. i am linking the two methods used by two different apps in the pictures below. please neglect if am not doing it right and let me know how can i assist more

Unmanic uses "--runtime=nvidia"
jellyfin uses "--gpus all"

i am yet to find apps that use jellfin's method but i have seen few which use "--runtime=nvidia" when they need to use GPU

@tigerinus
Copy link
Contributor

We are actively moving current app management to Docker Compose based, to leverage the full parameters of compose format.

Technically you should be able to specify GPU related parameters by then.

e.g. https://www.howtogeek.com/devops/how-to-run-docker-compose-containers-with-gpu-access/

@tigerinus
Copy link
Contributor

official source: https://docs.docker.com/compose/gpu-support/

@pbzh
Copy link

pbzh commented Mar 11, 2023

fIndeed, HWA with nvidia gpu works. I've two plex and one emby docker running without an issue, running ubuntu server 22.04, GTX 1050 TI as a VM on a ESX 8 host. Just follow this guide and just ad "“default-runtime”: “nvidia” to your docker daemon.json file, example here

Hope this helps :-)

btw all other containers shouldn't be affected by the nvdidia runtime!

edit: and don't forget to add following env vars:

  • NVIDIA_VISIBLE_DEVICES=all
  • NVIDIA_DRIVER_CAPABILITIES=all

@tigerinus tigerinus moved this from Future to In Progress (Dev) in CasaOS Issues Mar 11, 2023
@tigerinus tigerinus added this to the v0.4.4 milestone Mar 11, 2023
@jerrykuku jerrykuku moved this from In Progress (Dev) to To be verified (QA) in CasaOS Issues Mar 28, 2023
@tigerinus
Copy link
Contributor

official source: https://docs.docker.com/compose/gpu-support/

this capability is indirectly provided by switching CasaOS Apps over to docker compose files in v0.4.4

check the doc above.

@bigverm23
Copy link

official source: https://docs.docker.com/compose/gpu-support/

this capability is indirectly provided by switching CasaOS Apps over to docker compose files in v0.4.4

check the doc above.

how do I switch an app over to docker compose?

@bigverm23
Copy link

by the way, the Jellyfin app through CasaOS recognizes the GPU by default, both Plex and Emby do not

@geman220
Copy link

fIndeed, HWA with nvidia gpu works. I've two plex and one emby docker running without an issue, running ubuntu server 22.04, GTX 1050 TI as a VM on a ESX 8 host. Just follow this guide and just ad "“default-runtime”: “nvidia” to your docker daemon.json file, example here

Hope this helps :-)

btw all other containers shouldn't be affected by the nvdidia runtime!

edit: and don't forget to add following env vars:

  • NVIDIA_VISIBLE_DEVICES=all
  • NVIDIA_DRIVER_CAPABILITIES=all

I believe I’ve followed your instructions but hw transcoding isn’t working for me.

The two relevant errors from Plex are

[ffmpeg] - cannot load libcuda.so.1
[ffmpeg] - could not dynamically load cuda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

6 participants