Description of image

How to Use Paperspace Integrations

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.


You can establish integrations to connect repositories and storage solutions to your Deployment. Integrations allow you to specify a Git LFS repository or storage bucket details to mount to the deployment replicas.

When you specify an integration, on deployment creation (not on replica spin up), a storage volume is created, the contents of the integration are downloaded and stored in the volume, and the volume is mounted to all replicas in the deployment. This leads to quicker start up times for autoscaling as replicas that are spun up due to autoscaling conditions, and do not need to re-download the contents of the integration.

There are three types of available integrations: git-lfs, s3, and do-spaces.

  • git-lfs - Git LFS repos are used for Hugging Face model repositories. Private model repositories need access keys and secret access keys specified.

  • s3 - S3 buckets or S3 compatible storage. Private S3 buckets need access keys and secret access keys specified.

  • do-spaces - DigitalOcean Spaces storage. Private files in DigitalOcean spaces need access keys and secret access keys specified.

To use private storage buckets or repositories, use of access keys are required. Any secret access key must be stored as a Paperspace secret which can be done in the console. To reference a secret value in a deployment spec, use the following syntax secret:mySecretName.

Configure Integrations

Use the following parameters in the deployment spec to configure integrations:

  • integrations: The overall label used to specify any integrations.

  • type: The type of integration specified - git-lfs, s3, and do-spaces.

    • name: The unique name of the integration

    • path: The mount path of the volume containing the integration contents.

    • url: The URL to the bucket storage or Git LFS repository.

    • region: (s3 only) The region the s3 bucket is located in.

    • accessKeyId: (Optional) The access key ID of the storage bucket or private Git LFS repository.

    • secretAccessKey: (Optional) The secret access key of the storage bucket or private Git LFS repository.

integrations: # List of integrations. Max is 5.
- type: git-lfs # git-lfs integration type
    name: falcon # unique name of the integration
    path: /models/ # the a unique path on the filesystem to mount the integration. In this spec, model files will be located at /models/falcon
    url: https://huggingface.co/tiiuae/falcon-7b # hugging face model url for cloning

- type: s3 # s3 integration type
    name: my-s3-integration
    path: /some/s3/mount/path # In this spec, the contents will be mounted at /some/s3/mount/path/my-s3-integration
    url: s3://my-integration-bucket/
    region: us-east-1
    accessKeyId: AKIAVWO7J5OJSCWRJ3HJ
    secretAccessKey: secret:secretAccessKey # stored as a project or team secret. Naming is arbitrary.