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

Allow fine control over GPU device placement #1

Open
eywalker opened this issue Sep 22, 2016 · 2 comments
Open

Allow fine control over GPU device placement #1

eywalker opened this issue Sep 22, 2016 · 2 comments
Assignees

Comments

@eywalker
Copy link
Owner

Currently, nvidia-docker-compose adds and mounts all NVIDIA volumes and devices to all services found in the docker-compose file. It would make sense to enable the user to specify which service(s) will be bound to NVIDIA. Extend the nvidia-docker-compose interface to take extra arguments to specify targets at the launch time.

@eywalker eywalker self-assigned this Sep 22, 2016
@eywalker eywalker changed the title Allow target service to be specified Allow fine control over GPU device placement Nov 10, 2016
@eywalker
Copy link
Owner Author

eywalker commented Nov 10, 2016

With version v0.4.0, you can now specify which GPU device should be included by specifying devices explicitly in docker-compose.yml. However, if you don't specify any devices, then all GPU devices will be made available to the container as was previously done before. Although I think this is an acceptable default, there is not a way to have no GPU device assigned to a service. Usually this is not an issue, but if you want to ensure that the service only uses CPU (i.e. TensorFlow defaults to using GPU if available), then not making the GPU device available to the service is the cleanest solution.

@eywalker
Copy link
Owner Author

eywalker commented Apr 9, 2018

This is now supported via the use of special config keyword enable_cuda=true/false as discussed here #25

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

No branches or pull requests

1 participant