Skip to main content

A simple tool to select the first available GPU(s) and run Python

Project description

Cuthon is a simple Python script to avoid setting CUDA_VISIBLE_DEVICES when running python programs on a GPU. This tool is intended for a fairly niche use-case: running python programs on an interactive node which has more than one GPU. For those that have done this often you may be relieved at never having to run nvidia-smi followed by setting CUDA_VISIBLE_DEVICES again (when running a python program that is). This script should save you about 11.5 seconds per python program launch – approximately the time it takes to run nvidia-smi followed by setting the CUDA_VISIBLE_DEVICES environment variable. I hope you enjoy those seconds back as much as I have.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuthon-0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

cuthon-0.1-py2.py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page