Skip to main content

deployments

Paperspace Gradient CLI reference guide for deployments.

create​

Create a deployment

Examples​

gradient deployments create \
--name "New Deployment" \
--projectId "prjpkflqz" \
--spec "deployment-spec.yaml"

Options​

NameTypeAttributesDescription
--namestringrequiredDeployment name
--projectIdstringrequiredProject ID
--specstringrequiredPath to a deployment spec file
--clusterIdstringoptionalCluster ID
--apiKeystringoptionalAPI key to use this time only

Response​

Created deployment: 3ba79e98-0ead-42d1-9a8d-caa01dffe11b

get​

Get a deployment

Examples​

gradient deployments get \
--id "3b093c22-ebe8-4316-a9ff-90cac17ef6cf"

Options​

NameTypeAttributesDescription
--idstringrequiredDeployment ID
--apiKeystringoptionalAPI key to use this time only

Response​

{
"id": "3b093c22-ebe8-4316-a9ff-90cac17ef6cf",
"name": "New Deployment",
"deploymentSpecs": [
{
"id": "dd8b8f94-86e7-44e4-aa94-411b978ff523",
"data": {
"image": "lucone83/streamlit-nginx",
"port": 8080,
"resources": {
"instanceType": "C4",
"replicas": 1
},
"command": null,
"env": [
{
"name": "ENV",
"value": "VAR"
}
],
"models": null
},
"endpointUrl": "d3b093c22ebe84316a9ff90cac17ef6cf.clg07azjl.paperspacegradient.com",
"actor": {
"avatarUrl": null,
"fullName": null
},
"cluster": {
"id": "clg07azjl"
},
"deploymentRuns": [
{
"id": "68d3ea2a-1b3a-4cb1-9bdd-a71dac724cb9",
"availableReplicas": 1,
"readyReplicas": 1,
"replicas": 1,
"deploymentRunInstances": [
{
"id": "f59d4292-4bf0-41be-a7c9-29494b5a5c1c",
"phase": "Running",
"dtStarted": "2022-03-15T01:04:18.000Z",
"dtFinished": null
}
]
}
]
}
]
}

list​

List deployments

Examples​

gradient deployments list

Options​

NameTypeAttributesDescription
--apiKeystringoptionalAPI key to use this time only

Response​

+----------------+--------------------------------------+
| Name | ID |
+----------------+--------------------------------------+
| New Deployment | 3b093c22-ebe8-4316-a9ff-90cac17ef6cf |
+----------------+--------------------------------------+

update​

Update a deployment

Examples​

gradient deployments update \
--id "3b093c22-ebe8-4316-a9ff-90cac17ef6cf" \
--name "New Deployment Name"

Options​

NameTypeAttributesDescription
--idstringrequiredDeployment ID
--namestringoptionalDeployment name
--projectIdstringoptionalProject ID
--clusterIdstringoptionalCluster ID
--specstringoptionalPath to a deployment spec file
--apiKeystringoptionalAPI key to use this time only

Response​

Updated deployment: 3b093c22-ebe8-4316-a9ff-90cac17ef6cf

delete​

Delete a deployment

Examples​

gradient deployments delete \
--id "3b093c22-ebe8-4316-a9ff-90cac17ef6cf"

Options​

NameTypeAttributesDescription
--idstringrequiredDeployment ID
--apiKeystringoptionalAPI key to use this time only

Response​

Deleted deployment: 3b093c22-ebe8-4316-a9ff-90cac17ef6cf