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

Missing Create Parameters? / Allow custom arguments #268

Open
apazureck opened this issue Jul 18, 2022 · 5 comments
Open

Missing Create Parameters? / Allow custom arguments #268

apazureck opened this issue Jul 18, 2022 · 5 comments
Assignees
Milestone

Comments

@apazureck
Copy link

apazureck commented Jul 18, 2022

Hi,

I try to create a container with GPU support with fluent docker, as specified in the Docker Documentation.

I figured out, that fluent docker does not have support for the GPU flag. I expected sth. like this:

containerBuilder.UseGpu("all");

I also did not find any way to work around. I expected it being something like this:

containerBuilder.WithCustomArgument("gpus", "all");

// or

containerBuilder.WithCustomArgument("--gpus all");

Am I missing something? The latter one would be some kind of fallback for everybody who needs features you did not provide with the builder.

If you like I would gladly offer to contribute these changes.

Cheers!

@mariotoffia
Copy link
Owner

mariotoffia commented Jul 19, 2022

Hi @apazureck thanks for your issue! I haven't looked into --gpus switch. How does it relate to --runtime switch?

Currently it is possible to set the --runtime=nvidia to enable NVIDIA GPU via ContainerBuilder UseRuntime(ContainerRuntime runtime)

Should the --gpus have any relation to this or? It was implemented using NVIDIA ref page

Second containerBuilder.WithCustomArgument(arg, params...) is really a great idea - I'll add that to the TODO list.

Cheers,
Mario :)

@mariotoffia mariotoffia self-assigned this Jul 19, 2022
@mariotoffia mariotoffia added this to To do in FluentDocker via automation Jul 19, 2022
@mariotoffia mariotoffia added this to the 3.0.0-RELEASE milestone Jul 19, 2022
@apazureck
Copy link
Author

As I understood so far it was nvidia exclusive for some time, but they now made it more generic. I'll check out the runtime switch, thanks for that hint, but I think I read somewhere that this is deprecated now (in favor of the GPU switch).

I'll talk to my customer, if they agree that we contribute this to your library, if it is OK for you.

@mariotoffia
Copy link
Owner

@apazureck I would be delighted if you contribute! :)

@mariotoffia
Copy link
Owner

I've been thinking - if --runtime has been deprectated and replaced with more advanced --gpus (saw that you could have several arguments there). It would be nice if we'd keep the runtime options (and nvidia for backards compatability and just add optiona all) and it will render --gpus switch instead of --runtime and the added capability as optional arguments. So existing FluentAPI uses will autiomatically use the newver options.

What do you think?

Cheers,
Mario :)

@apazureck
Copy link
Author

Sure, I would not touch anything breaking the old logic. I already asked my customer and it would be OK to them, if I put some effort. I will try to fit it in the next weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
FluentDocker
  
To do
Development

No branches or pull requests

2 participants