FluentDocker
FluentDocker copied to clipboard
Missing Create Parameters? / Allow custom arguments
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!
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 :)
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.
@apazureck I would be delighted if you contribute! :)
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 :)
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.