Deployment Spec
A deployment is maintained by a spec file which is used to change the state of the deployment.
Model integration
You can also automatically pull in any models that you have registered through the Gradient Model Registry at runtime. To do this, we just add a models
parameter to our deployment spec where we can specify the model(s) we want to pull in by their ID, and optionally also the filepath inside our deployed container where we want to mount them into. If the path is not specified, it will default to /opt/models
.
Cloning Repositories into a Deployment
If you don't want to package everything into a Docker container, you can also clone any one or more Git repositories into your Deployment at runtime. To do this, just supply the optional repositories
configuration in your deployment spec, and specify:
the dataset ID you want to use to sync the repositories into;
the folder that you want to access your repositories from within the Deployment; and
the URL for one or more Git repositories that you want to clone
Note that if you are using a private Git repository, you can configure authenticated access by also supplying the optional username
and password
parameters. The password field will need to reference a Gradient Secret and should not contain the plaintext password itself.
You must also have already created a Gradient Dataset to use this feature. We clone your repository into a Dataset for local storage and access within the cluster by your Deployment and are not able to automatically create one for you at this time.
For example, let's say that I want to clone two repositories, one that is public, and one that is private and requires a username and password. I might use a spec like the following:
Once this completes, I will have access to the TensorFlow Serving repository at /opt/repos/tf-serving
, and to a repo of private ML code at /opt/repos/paperspace-ml
.
Container Registry integration
Private Docker images can be used by referencing your Container Registry which contains credentials to access that image.
To configure a Container Registry, follow this short guide.
Once configured, we add a containerRegistry
parameter to our deployment spec and specify the name of the Container Registry.
Last updated