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

Add ENV NVIDIA_DRIVER_CAPABILITIES=all to permit Video SDK transcoding, 3D rendering, and X11 OpenGL Display #1288

Merged

Conversation

nelsonjchen
Copy link
Contributor

@nelsonjchen nelsonjchen commented Sep 5, 2023

NVIDIA/nvidia-container-runtime#112

I'm interested in capabilities beyond the default Nvidia base images of just compute and utility. I'm particularly interested in using the video encoding and decoding functionality and OpenGL in an X11 application.

@nelsonjchen nelsonjchen force-pushed the set-NVIDIA_DRIVER_CAPABILITIES-to-all branch 2 times, most recently from a2f586a to 3d3d238 Compare September 5, 2023 06:46
@nelsonjchen
Copy link
Contributor Author

Hmm works locally on my WSL2 machine but not on replicate.com itself. Will need to continue investigating.

@nelsonjchen
Copy link
Contributor Author

May have shot myself in foot. Will revisit sometime in the future.

@nelsonjchen nelsonjchen closed this Sep 5, 2023
@nelsonjchen
Copy link
Contributor Author

nelsonjchen commented Sep 9, 2023

https://replicate.com/p/jokv5fbbljv3mu64k4eyyyqjli

Nope, got it working after all. Pretty pleased 😄 . I would like to bring this up for re-consideration.

@nelsonjchen nelsonjchen reopened this Sep 9, 2023
@nelsonjchen nelsonjchen marked this pull request as ready for review September 9, 2023 07:27
@nelsonjchen nelsonjchen force-pushed the set-NVIDIA_DRIVER_CAPABILITIES-to-all branch from 3d3d238 to e5f9947 Compare September 9, 2023 07:33
@nelsonjchen nelsonjchen changed the title Add ENV NVIDIA_DRIVER_CAPABILITIES=all Add ENV NVIDIA_DRIVER_CAPABILITIES=all to permit Video SDK transcoding and 3D rendering Sep 17, 2023
@nelsonjchen nelsonjchen changed the title Add ENV NVIDIA_DRIVER_CAPABILITIES=all to permit Video SDK transcoding and 3D rendering Add ENV NVIDIA_DRIVER_CAPABILITIES=all to permit Video SDK transcoding, 3D rendering, and X11 OpenGL Display Sep 18, 2023
@nelsonjchen
Copy link
Contributor Author

Could there be some consideration of this? It is not possible to set this at runtime and get the same results as the Nvidia parts of the runtime will mount more files into the container if it sees these environment variables set. That is not something possible when the container is already running.

@zeke
Copy link
Member

zeke commented Oct 19, 2023

Hi @nelsonjchen sorry your PR went unnoticed. This seems like a sensible change to me, but do you have a sense of whether this change might break anything?

Wold you be willing to update this PR with docs about the purpose of this env var in https://github.com/replicate/cog/blob/main/docs/environment.md ?

@nelsonjchen
Copy link
Contributor Author

Hi @nelsonjchen sorry your PR went unnoticed. This seems like a sensible change to me, but do you have a sense of whether this change might break anything?

My sense is that it does not, but I am also not a typical/normal/daily GPU user. However, I do defer to this comment by an Nvidia employee in the thread I linked on Nvidia's repo about this which was made about 3 years ago with a general approval for this kind of change:

NVIDIA/nvidia-container-runtime#112 (comment)

Wold you be willing to update this PR with docs about the purpose of this env var in https://github.com/replicate/cog/blob/main/docs/environment.md ?

I don't know. It's not really configurable which is unprecedented. The environment variables there are usually customizable. I suppose I could add a section of "interesting" environmental variables that can't be configured but might be of interest.

@nelsonjchen nelsonjchen force-pushed the set-NVIDIA_DRIVER_CAPABILITIES-to-all branch from 66bf240 to a875807 Compare October 19, 2023 02:48
@nelsonjchen
Copy link
Contributor Author

@zeke Documented. Not sure if that's what you're looking for.

@nelsonjchen nelsonjchen force-pushed the set-NVIDIA_DRIVER_CAPABILITIES-to-all branch from a875807 to 9d9d39b Compare October 19, 2023 02:56
Copy link
Member

@zeke zeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good to me, and the documentation is clear and helpful. 👍🏼

That said, I would like to get a second opinion from folks who have more expertise on the matter and can speak to possible issues that could arise from enabling this.

cc @technillogue @mattt @joehoover @anotherjesse @daanelson

@nelsonjchen
Copy link
Contributor Author

Maybe this can be more palatable as an option?

@zeke
Copy link
Member

zeke commented Nov 13, 2023

Hey @nelsonjchen sorry there hasn't been much attention on this.

I think it'd be much less risky to ship this as an option than a new default. 👍🏼

@nelsonjchen
Copy link
Contributor Author

OK, I'll see what I can do to propose it as an option.

@nelsonjchen nelsonjchen marked this pull request as draft November 15, 2023 18:03
@technillogue
Copy link
Contributor

I think I'm fine with this even without it being an option. Can you rebase on main please?

@nelsonjchen nelsonjchen force-pushed the set-NVIDIA_DRIVER_CAPABILITIES-to-all branch from 9d9d39b to 5e4ea6e Compare November 17, 2023 10:18
@nelsonjchen nelsonjchen marked this pull request as ready for review November 17, 2023 10:19
@nelsonjchen nelsonjchen force-pushed the set-NVIDIA_DRIVER_CAPABILITIES-to-all branch from 5e4ea6e to dbac30b Compare November 17, 2023 10:20
@nelsonjchen
Copy link
Contributor Author

Rebased on main.

@technillogue technillogue merged commit 21b7b9c into replicate:main Nov 17, 2023
13 checks passed
wizgrao pushed a commit to sieve-data/cog that referenced this pull request Jul 23, 2024
…g, 3D rendering, and X11 OpenGL Display (replicate#1288)

* Add ENV NVIDIA_DRIVER_CAPABILITIES=all
* Document NVIDIA_DRIVER_CAPABILITIES

Signed-off-by: Nelson Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants