Metadata-Version: 2.1
Name: mask-gpu
Version: 0.0.1
Summary: A simple tool to show specified number of GPUs with desired memory to Tensorflow
Home-page: https://github.com/saravanabalagi/mask-gpu
Author: Saravanabalagi Ramachandran
Author-email: saravanabalagi@hotmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown

# Mask GPU
A simple tool to expose only specified number of GPUs with desired memory to Tensorflow

## Dependencies
- nvidia-smi

## Installation
```sh
pip install mask-gpu
```
## Quick Start

To show available GPUs info
```sh
mask-gpu --info
# Outputs the following
# Finding GPUs with a minimum of 1024MiB free memory...
# GPUs available: 6 -> [0, 1, 4, 5, 6, 7]
```

Simply run `mask-gpu` to expose 1 GPU
```sh
mask-gpu
# Finding GPUs with a minimum of 1024MiB free memory...
# GPUs available: 6 -> [0, 1, 4, 5, 6, 7]
# ---------------------
# Alloting 1 GPU(s)...
# Visible GPUs: 1 -> [0]
```
## Specifying Options

By default `mask-gpu` seraches for GPUs with atleast 1024M free memory and allots 1 GPU
```sh
mask-gpu --info --min_memory 1024
# mask-gpu -s -m 1024                <--- Same as above

mask-gpu --expose 1 --min_memory 1024
# mask-gpu -e 3 -m 1024              <--- Same as above
```
You can specify your own options using the above as the template

## Licence

The MIT License

Copyright (c) 2019 Saravanabalagi Ramachandran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


