MrMino / dockernel

Dockerized Jupyter kernels
MIT License
55 stars 15 forks source link

Support for "--gpus all" and other possible container properties #20

Open Tiendil opened 3 years ago

Tiendil commented 3 years ago

Hi!

First of all, great project! Is it still alive? There is no activity since April.

In continue of discussion in gh-19.

I looked into possible ways of implementing support for --gpus all cli argument and other arguments of docker.containers.run.

There are a lot of arguments for docker.containers.run, besides device_requests (throught which --gpus all implemented). Most of them are useful in one or another way. It seems to me, there is no good way to specify them all as command-line arguments for dockernel .

What do you think about other ways?

The config file may need to use Python, since docker.containers.run requires complex data structures, like docker.types.DeviceRequest. So, the first approach fills easier to implement and use.

MrMino commented 3 years ago

Hi

First of all, great project! Is it still alive? There is no activity since April.

Thanks! :) It's alive. I decided to shift my attention to wheelfile and IPython for now, but I'm still planning to move this forward - I'd like to pick up the slack in the next week or two, depending on how much time I'll have for OSS work.

The config file may need to use Python, since docker.containers.run requires complex data structures, like docker.types.DeviceRequest. So, the first approach fills easier to implement and use.

I wanted to implement a config scheme and add different options incrementally. I haven't thought it through yet though - e.g. I'm not sure whether these options should be remembered inside the kernelspec too. I will have to test it out.

I'm certainly against the idea of having an executable script that provides the config (ala setuptools). I'd like it to be either TOML, JSON or YAML (maybe something similar to docker-compose?).

The details are TBD, but most likely there will be a "config lookup" mechanism similar to pyenv's - a .dockernel file will be searched for up the filesystem tree, parsed into a dict, merged with other config files, and the kernels will be run based on that.