# Paperspace

## What is Paperspace?

Paperspace is a cloud computing platform that enables developers to create next-generation applications from within their web browser. Paperspace offers a variety of Machine Learning models and fully managed cloud GPU platforms for endless development environments. Paperspace allows you to use and store data on S3-compatible storage services such as Filebase.

Read below to learn how to use Paperspace with Filebase.

{% hint style="success" %}

### Prerequisites:

* [x] Download and configure [AWS CLI](https://docs.filebase.com/configurations/cli-tools-and-resources/cli-tools/aws-cli) for use with Filebase.
* [x] [Sign up](https://filebase.com/signup) for a free Filebase account.&#x20;
* [x] Have your Filebase Access and Secret Keys. Learn how to view your access keys [here](https://docs.filebase.com/getting-started-guides/getting-started-guide#working-with-access-keys).
* [x] Create a Filebase Bucket. Learn how to create a bucket [here](https://docs.filebase.com/getting-started-guides/getting-started-guide#creating-and-working-with-buckets).
  {% endhint %}

### 1. First, we need to configure our Filebase bucket to have a CORS policy that allows connection to Paperspace.

For more detailed information on CORS, check out our documentation [here.](https://docs.filebase.com/configurations/cli-tools-and-resources/cross-origin-resource-sharing-cors)

To do this, create a new file called `cors.json` with the following content:

```json
{
    "CORSRules":
[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT"
        ],
        "AllowedOrigins": [
            "https://console.paperspace.com"
        ],
        "ExposeHeaders": [],
        "MaxAgeSeconds": 3000
    }
]

}
```

### 2. Next, apply this CORS policy to your Filebase bucket with the command:

`aws --endpoint https://s3.filebase.com s3api put-bucket-cors --bucket filebase-bucket --cors-configuration=file://cors.json`

### 3. To confirm the CORS policy was applied correctly, use the following command:

`aws --endpoint https://s3.filebase.com s3api get-bucket-cors --bucket filebase-bucket`

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FEzNeD0oWLgIkMfNDJHHF%2Fimage.png?alt=media\&token=52a96506-3e3c-418f-b766-4d19f6fce05d)

### 4. Login to the [Paperspace dashboard](https://console.paperspace.com/jamongeon1/projects).

When prompted for the product type, select Gradient. You’ll be brought to the Gradient dashboard.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2F4IDPm5EDe2tGJwMuQgoH%2Fimage.png?alt=media\&token=bab57d2f-bb1b-4f84-8479-013cecab247a)

### 5. Select your account’s image in the top left corner, then select ‘Team Settings’:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FMQXk7jLBxLZZcL0scBWt%2Fimage.png?alt=media\&token=aff82cbc-fba8-46cc-9ba0-c6b7b95cf589)

### 6. From your account settings, select the ‘Storage’ tab:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2F9XPDxEyjWYA2WobxH2lP%2Fimage.png?alt=media\&token=d6c04e7d-6f93-4c7e-b114-5faa2c689c61)

### 7. Once you’re in the Storage tab, select ‘Add Storage Provider’ in the bottom right.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FqWPUYDB3fity5TixOaLL%2Fimage.png?alt=media\&token=331e6fc1-48ba-4c10-96d1-a288b05b2b2b)

### 8. Select ‘S3-compatible’ as the storage type:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2Fq2NqKN9Fj4d8HPnyGqmO%2Fimage.png?alt=media\&token=b4693b76-22a0-4190-8c44-5279526a4204)

### 9. Configure the following settings to connect Paperspace to your Filebase account:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FcmhdhgNu2wtNDm7cQcnk%2Fimage.png?alt=media\&token=be932c18-2a0c-4551-8ac2-48f504898d97)

* **Name:** Filebase
* **Bucket:** Filebase Bucket Name
* **Access Key ID:** Filebase Access Key
* **Secret Access Key:** Filebase Secret Key
* **Endpoint:**<https://s3.filebase.com>
* **Signature Version**: v4
* **Is default storage provider:** Toggle to enabled.

Then click ‘Create’.

### 10. Filebase will now be listed as a storage provider for your Paperspace account.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2F5kEBolzICSS3ZUEm6by7%2Fimage.png?alt=media\&token=77feba41-a4a5-424c-81ea-9702391b5624)

### 11. Head back to the Paperspace dashboard. Select ‘Create a Project’:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2Fet52vR3yEFwANteJbwCt%2Fimage.png?alt=media\&token=cb248788-23b1-4a4c-974e-322f9adbec8a)

### 12. Give your project a name, or use the auto-generated name.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FnVtpmj2sUsoeJ2q3u7p7%2Fimage.png?alt=media\&token=2f6a3c5b-df21-4acd-a270-d4198c87d2af)

### 13. Select the ‘Data’ tab.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FgZpsJxcV8p99bYgc7vG1%2Fimage.png?alt=media\&token=5444a926-7ce4-40df-8e78-94ceca805b18)

### 14. Then select ‘Create a Dataset’:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FlpgphoFhh1XgxTlnXjKx%2Fimage.png?alt=media\&token=12f06185-d576-4524-a737-b5459d6a5087)

### 15. Give your dataset a name and description, then from the drop-down menu, select your Filebase storage provider configuration.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FbqfWAixwGyieDtB5KR8T%2Fimage.png?alt=media\&token=0016e2a0-3a2b-4a61-9ad3-7a92c1dc775a)

### 16. Drag and drop files, or select the prompt to upload files:

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2FqYcpCqTznauoFzGSB0zE%2Fimage.png?alt=media\&token=92c70cfd-2b51-4e55-8d24-8863b42d0fb9)

### 17. Once you’ve selected your files, click ‘Upload’.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2Fyxfs1MX5wvaXtdo0Bk7v%2Fimage.png?alt=media\&token=cbdec7a3-3435-491d-9ecd-c512c4cc4755)

### 18. Your uploaded files will be reflected in your Filebase bucket.

![](https://3861818989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lyjw7dWpiQtUFDa1pO0%2Fuploads%2F1bplln6VMd4KGDQ34TAr%2Fimage.png?alt=media\&token=9f552cdf-fc1b-4a00-ad1b-fd52d918f4f6)
