Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow "direct" Docker host config

See original GitHub issue often lags Go interface by quite some time. For example, there’s support for --gpus in the CLI but not I propose that we allow DockerSpawner to bypass HostConfig, and just send parameters directly to the Docker daemon. There’s a hack solution to support gpus in RSDockerSpawner, which would be better implemented if DockerSpawner allowed host_config to be modified after the create_host_config.

I think the general takes on converting arguments is flawed, that is, HostConfig shouldn’t be mapping Python names to Go config names. There are 63 parameters to HostConfig. This is problematic for a number of reasons, mostly because we can’t look at the Go code to figure out the names for things. It would be cleaner to just pass the Go parameters directly.

I’m happy to submit a PR, but this is something that obviously needs discussion. My hack works for now.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

robnaglercommented, Feb 15, 2020

@samon11 You will need to create a subclass of DockerSpawner. This can be done in the config, and then you need to override the docker method.

acelerecommented, Apr 11, 2022

OK. Figured it out. I ran the stock NVIDIA container interactively with: docker run --gpus all -it --rm and got the following message back: nvidia_01

So I need a new GPU 😃

Anyway, I guess the hint here is to run the container and check the errors…because not all of the output is presented to the user on Jupyterhub.


Read more comments on GitHub >

github_iconTop Results From Across the Web

Networking using the host network - Docker Documentation
This series of tutorials deals with networking standalone containers which bind directly to the Docker host's network, with no network isolation.
Read more >
Use host networking - Docker Documentation
Host mode networking can be useful to optimize performance, and in situations where a container needs to handle a large range of ports,...
Read more >
Docker daemon configuration overview
To configure the Docker daemon using a JSON file, create a file at /etc/docker/daemon.json on Linux systems, or C:\ProgramData\docker\config\daemon.json on ...
Read more >
dockerd - Docker Documentation
You can configure the Docker daemon to listen to multiple sockets at the same time using multiple -H ... Bind Docker to another...
Read more >
Store configuration data using Docker Configs
Docker swarm service configs allow you to store non-sensitive information, ... directly into the container's filesystem without the use of RAM disks.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found