Paperspace Deployments are containers-as-a-service that allow you to run container images and serve machine learning models using a high-performance, low-latency service with a RESTful API.
Gradient Deployments can be created in the web console or the CLI. When created in the web console, the backend submits a spec file that outlines specifications for a deployment.
You can create deployments using the Gradient CLI and linking an API key. Learn how to create an API key. You also need an existing Project to run your deployment.
enabled: true
image: lucone83/streamlit-nginx
port: 8080
env:
- name: ENV
value: VAR
resources:
replicas: 1
instanceType: C4
gradient deployments create --name [deployment-name] --projectId [project-id] --spec deployment.yaml --apiKey [api-key]
gradient deployments get --id [deployment-id] --apiKey [api-key]
Use the CLI to create this example deployment. A credit card on the workspace is necessary and this charges the account until the deployment is turned off.
learn-gradient-deployment.yaml
and add the following code.enabled: true
image: lucone83/streamlit-nginx
port: 8080
env:
- name: ENV
value: VAR
resources:
replicas: 1
instanceType: C4
deployment id
. Click here to set up the Gradient CLI.gradient deployments create --name learn-gradient-deployment --projectId [projectID] --spec learn-gradient-deployment.yaml --apiKey [api-key]
deployment id
from the previous step.gradient deployments get --id [deployment-id] --apiKey [api-key]
enabled
value to false
in the spec.enabled: false
image: lucone83/streamlit-nginx
port: 8080
env:
- name: ENV
value: VAR
resources:
replicas: 1
instanceType: C4
gradient deployments update --id deployment-id --spec learn-gradient-deployment.yaml --apiKey [api-key]