A simple script to create a tmux session with multiple windows for development with CUDA GPUs.
It creates a tmux session with the following windows:
- A window with
nvidia-smirunning continuously, to monitor the GPU usage. - A window for each GPU detected, with the
CUDA_VISIBLE_DEVICESenvironment variable set to the GPU index. - A miscellaneous window.
And that's it! You can now run your code in the terminal windows of the GPUs you want to use.
To use it, just run the script:
./tmux-creator.shIf you want to add the script as a global binary, you can run the setup script:
./bin-setup.shThis will create a symlink to the script in ~/.local/bin/tmux-creator, so you can run it from anywhere by just typing:
tmux-creator