Before you can use this tool, you'll need a Paperspace account.
Option 1: Using Pip
pip install paperspace
Option 2: Download the binaries
Pre-built binaries are available for Windows, Mac, and Linux. These binaries enable you to run the CLI without any additional packages. Be sure to add the directory where the binary is installed to your path.
Option 3: Install the package from npm
$ npm install -g paperspace-node
We recommend installing this globally is so the
paperspace command will be available on your command line everywhere on your system. If you only want to make it available within an individual Node.js project, you can install it locally by omitting the
-g flag. Be sure to also add this directory to your path.
Prerequisite: Your system will need Node.js v8+ installed. Check that you have a recent enough version by running
node -v in your terminal. Node.js comes bundled with
npm, the Node.js package management tool, which you'll use to install this package.
Connecting your account
You can either log in via the command line or use your API key to connect your account.
paperspace login Email: firstname.lastname@example.org Password: ******
Obtaining an API key
First, sign in to your Paperspace account. On the left of your home console, you should find an 'API' section. There, you'll find a form where you can create API keys. You'll use the API keys you generate here to authenticate your requests.
Initialize a project directory
You can create a job by going in to any directory and typing
paperspace project init which will initialize a namespace with the current directory's name.
Submit a job
You are now ready to run a job (even without any code!). You can run:
paperspace jobs create --container Test-Container --command "nvidia-smi"
Your job will get uploaded to our cluster of machines. Behind the scenes, we are zipping the current working directory, creating a Docker container, and running the command you provided.
There are several optional Job parameters. See the full list here.
Note: the zipped upload of your working directory is limited to 100MB
Check your Job progress
Job states go from Queued > Pending > Running
Once the Job is in a Running state, you can watch your Job run in the CLI and web UI. For example, you should see the output of `nvidia-smi` by running paperspace jobs logs --tail.
A Job can complete with the following states: Success, Cancelled, or Error
Once your Job has completed, anything added to the /artifacts can be managed via the CLI. Example use:
|artifactsList||List job artifact files for the specified job.|
|artifactsGet||Get the artifacts files for the job with the given ID|
|artifactsDestroy||Destroy artifact files of the job with the given ID|