paperdev v1.0.0
paperdev
Save money when running VMs in PaperSpace.
paperdev is an unofficial CLI tool that automatically starts and stops PaperSpace VMs. Only be billed for the exact amount of time you need.
Simply run paperdev to start your VM and drop you directly into SSH. When you exit your VM, paperdev will automatically stop your VM, preventing you from being billed for unused compute time. (You will still be billed for storage space, etc.)
Table of Contents
Background
A VM with 8 vCPUs and 16 GiB RAM costs US$95 per month - expensive for adhoc work. You can also run the VM for US$0.13 per hour but then you have to manually start and stop the VM in a web interface and you still get billed if you forget to turn it off.
If you run the VM for 30 hours a week, every week, for a month, at the end of the month you would be billed only US$16.77, saving you $78.23 (or more than 80%) for the above configuration. paperdev allows you to run VMs for only the hours you need with a single command.
This tools allows you to quickly spin up and spin down high powered machines (even with GPUs) for a fraction of the monthly cost.
Install
This package is distributed via NPM. To install it, you can run npm i -g paperdev
Usage
Before using paperdev, you must first enter your API Key to enable the paperdev CLI tool to communicate with PaperSpace.
paperdev auth <API Key>
# Example: paperdev auth 4da89ce88462cbf1c6cd8b49fc2476You must also create the VM in the PaperSpace Core console. Make sure you set the Public IP option to Dynamic (preferred for cost optimization) or Static (for the IP address to not change). This is so you can connect to the VM over SSH. Once the VM is created, you must set the VM ID in paperdev.
paperdev set <VM ID>
# Example: paperdev set pkpzwrwznOnce configured, simply run paperdev to start your VM and drop you directly into SSH. When you exit your VM, paperdev will automatically stop your VM, preventing you from being billed for the unused compute time.
Run paperdev <command> --help for help using any command.
Commands:
paperdev auth Set the API key for authentication
paperdev Connect to the PaperSpace VM [default]
paperdev set <id> Set the Virtual Machine ID
paperdev start Send the start command to the VM
paperdev state Displays the current state of the VM
paperdev stop Send the shut down command to the VM
Options:
-v, --version Show version number [boolean]
-h, --help Show help [boolean]Demo

Contribute
PRs are welcome!
If updating the README, please stick to the standard-readme specification.
License
MIT © Matt Reid
Get US$10 free credit with PaperSpace using this referral link (more details).