{ "info": { "author": "Saravanabalagi Ramachandran", "author_email": "saravanabalagi@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "# Mask GPU\nA simple tool to expose only specified number of GPUs with desired memory to Tensorflow (and a few more apps, read further). This tool queries GPU free memory values using `nvidia-smi` and assigns `CUDA_VISIBLE_DEVICES` environment variable based on the specified memory and number of GPUs to expose, to expose specific GPUs. Apps such as `tensorflow-gpu` use this information and utilize only the GPUs that are exposed. If your app does not make use of `CUDA_VISIBLE_DEVICES`, then this is probably **not** what you would need.\n\n## Dependencies\n- nvidia-smi\n\n## Installation\n```sh\npip install mask-gpu\n```\n## Quick Start\n\nTo show available GPUs info\n```sh\nmask-gpu --info\n# Outputs the following\n# Finding GPUs with a minimum of 1024MiB free memory...\n# GPUs available: 6 -> [0, 1, 4, 5, 6, 7]\n```\n\nSimply run ``mask-gpu`` to expose 1 GPU (with a minimum of 1024MiB free memory)\n```sh\n`mask-gpu`\n# Remember to wrap mask-gpu in ` symbol\n# Or else mask-gpu will print the command\n# and you will have to manually execute it\n```\n\n## Specifying Options\n\nBy default `mask-gpu` seraches for GPUs with atleast 1024M free memory and allots 1 GPU\n```sh\nmask-gpu --info --min_memory 1024\n# mask-gpu -i -m 1024 <--- Same as above\n# Info does not execute any commands\n\n`mask-gpu --expose 1 --min_memory 1024`\n# `mask-gpu -e 3 -m 1024` <--- Same as above\n# Remember to wrap mask-gpu in ` symbol\n```\nYou can specify your own options using the above as the template\n\n## Unmask all (Revert)\n\nTo unmask all GPUs, i.e, to revert to what it was before using `mask-gpu`\n\n```sh\n`mask-gpu --unmask-all`\n# `mask-gpu -u` <--- Same as above\n# Remember to wrap mask-gpu in ` symbol\n```\n\nNOTE: This command will clear `CUDA_VISIBLE_DEVICES` and hence it will be erased when executing the above command\n\n## Licence\n\nThe MIT License\n\nCopyright (c) 2019 Saravanabalagi Ramachandran\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/saravanabalagi/mask-gpu", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mask-gpu", "package_url": "https://pypi.org/project/mask-gpu/", "platform": "", "project_url": "https://pypi.org/project/mask-gpu/", "project_urls": { "Homepage": "https://github.com/saravanabalagi/mask-gpu" }, "release_url": "https://pypi.org/project/mask-gpu/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A simple tool to show specified number of GPUs with desired memory to Tensorflow", "version": "0.1.0" }, "last_serial": 4973080, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "e77cc5f159853fcf00cceaa8ae635626", "sha256": "8772b720ecb3ee7b41c6531d5e0f5389a924106ad0a7bd58f461c0fc01e45cbc" }, "downloads": -1, "filename": "mask_gpu-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e77cc5f159853fcf00cceaa8ae635626", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4762, "upload_time": "2019-03-19T20:26:08", "url": "https://files.pythonhosted.org/packages/49/e9/8107f6fd0c5edb40ada5f4fe776ab92e6a7733b9ff6727af6f55a4bc192f/mask_gpu-0.0.1-py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "281744cf47c12732d0415ec92fc918d2", "sha256": "6a46a7af4379579a901b774807be3c479b99103186c7b69b3cb0a71006cf3b4d" }, "downloads": -1, "filename": "mask_gpu-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "281744cf47c12732d0415ec92fc918d2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5467, "upload_time": "2019-03-22T14:28:15", "url": "https://files.pythonhosted.org/packages/95/77/64e814405b2d0a52aaffbe136856065907cfd0b62e2642ce303cf57b47dd/mask_gpu-0.1.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "281744cf47c12732d0415ec92fc918d2", "sha256": "6a46a7af4379579a901b774807be3c479b99103186c7b69b3cb0a71006cf3b4d" }, "downloads": -1, "filename": "mask_gpu-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "281744cf47c12732d0415ec92fc918d2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5467, "upload_time": "2019-03-22T14:28:15", "url": "https://files.pythonhosted.org/packages/95/77/64e814405b2d0a52aaffbe136856065907cfd0b62e2642ce303cf57b47dd/mask_gpu-0.1.0-py3-none-any.whl" } ] }