---
title: Runpod
meta_desc: Provides an overview of the Runpod Provider for Pulumi.
layout: package
---
The Runpod provider for Pulumi can be used to provision [Runpod](https://www.runpod.io) resources.
The Runpod provider must be configured with Runpod's API keys to deploy and update resources in Runpod.
## Config
To begin with, please set your runpod API key to use with Pulumi.
```bash
pulumi config set --secret runpod:token
```
## Example
This is an example of how to deploy it over Golang. We also serve pulumi over Typescript and Python. For more examples, please navigate to the examples directory
or the documents inside docs. If you have any problems in doing so, please contact support@runpod.io.
1. Create a new Pulumi Go example:
```
pulumi new
```
Select either the Go template or Runpod's Go template.
2. Set your API keys using the config shown above.
3. Install the official Go package:
```
go get github.com/runpod/pulumi-runpod-native/sdk/go/runpod@v1.1.8
```
Replace the version above to any that you want. We advise you to pin a certain version as there will be fewer breaking changes.
4. Use this example as a simple building guide for your example project:
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as runpod from "@runpod-infra/pulumi";
const testNetworkStorage = new runpod.NetworkStorage("testNetworkStorage", {
name: "testStorage1",
size: 20,
dataCenterId: "US-NJ",
});
const myRandomPod = new runpod.Pod("myRandomPod", {
cloudType: "ALL",
networkVolumeId: testNetworkStorage.networkStorage.apply(networkStorage => networkStorage.id),
gpuCount: 1,
volumeInGb: 50,
containerDiskInGb: 50,
minVcpuCount: 2,
minMemoryInGb: 15,
gpuTypeId: "NVIDIA GeForce RTX 3070",
name: "RunPod Pytorch",
imageName: "runpod/pytorch",
dockerArgs: "",
ports: "8888/http",
volumeMountPath: "/workspace",
env: [{
key: "JUPYTER_PASSWORD",
value: "rns1hunbsstltcpad22d",
}],
});
export const pod = {
value: myRandomPod.pod,
};
export const networkStorage = {
value: testNetworkStorage.networkStorage,
};
```
5. PULUMI UP
Create your resources using the command below:
```
pulumi up
```
6. PULUMI DOWN
If you want to remove your resources, you can use the command below:
```
pulumi down
```
If you have any issues, please feel free to create an issue or reach out to us directly at support@runpod.io.
> **Note:** For examples in Go and Python, please visit the documentation inside the docs directory or click [here](https://github.com/runpod/pulumi-runpod-native/tree/main/docs).
Raw data
{
"_id": null,
"home_page": "https://runpod.io",
"name": "runpod-pulumi-infra",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "pulumi runpod gpus ml ai",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/18/92/56e2b990f3e5700120c37fa5c4a5975f34e081f8056f2760019a10799a01/runpod_pulumi_infra-1.2.2.tar.gz",
"platform": null,
"description": "---\ntitle: Runpod\nmeta_desc: Provides an overview of the Runpod Provider for Pulumi.\nlayout: package\n---\n\nThe Runpod provider for Pulumi can be used to provision [Runpod](https://www.runpod.io) resources.\nThe Runpod provider must be configured with Runpod's API keys to deploy and update resources in Runpod.\n\n## Config\n\nTo begin with, please set your runpod API key to use with Pulumi.\n\n```bash\n pulumi config set --secret runpod:token\n```\n\n## Example\n\nThis is an example of how to deploy it over Golang. We also serve pulumi over Typescript and Python. For more examples, please navigate to the examples directory\nor the documents inside docs. If you have any problems in doing so, please contact support@runpod.io.\n\n1. Create a new Pulumi Go example:\n```\n pulumi new\n```\nSelect either the Go template or Runpod's Go template.\n\n2. Set your API keys using the config shown above. \n\n3. Install the official Go package:\n\n```\n go get github.com/runpod/pulumi-runpod-native/sdk/go/runpod@v1.1.8\n```\nReplace the version above to any that you want. We advise you to pin a certain version as there will be fewer breaking changes.\n\n4. Use this example as a simple building guide for your example project:\n\n```typescript\n import * as pulumi from \"@pulumi/pulumi\";\n import * as runpod from \"@runpod-infra/pulumi\";\n\n const testNetworkStorage = new runpod.NetworkStorage(\"testNetworkStorage\", {\n name: \"testStorage1\",\n size: 20,\n dataCenterId: \"US-NJ\",\n });\n const myRandomPod = new runpod.Pod(\"myRandomPod\", {\n cloudType: \"ALL\",\n networkVolumeId: testNetworkStorage.networkStorage.apply(networkStorage => networkStorage.id),\n gpuCount: 1,\n volumeInGb: 50,\n containerDiskInGb: 50,\n minVcpuCount: 2,\n minMemoryInGb: 15,\n gpuTypeId: \"NVIDIA GeForce RTX 3070\",\n name: \"RunPod Pytorch\",\n imageName: \"runpod/pytorch\",\n dockerArgs: \"\",\n ports: \"8888/http\",\n volumeMountPath: \"/workspace\",\n env: [{\n key: \"JUPYTER_PASSWORD\",\n value: \"rns1hunbsstltcpad22d\",\n }],\n });\n export const pod = {\n value: myRandomPod.pod,\n };\n export const networkStorage = {\n value: testNetworkStorage.networkStorage,\n };\n```\n\n5. PULUMI UP\nCreate your resources using the command below:\n\n```\n pulumi up\n```\n\n6. PULUMI DOWN\nIf you want to remove your resources, you can use the command below:\n\n```\n pulumi down\n```\n\nIf you have any issues, please feel free to create an issue or reach out to us directly at support@runpod.io.\n\n> **Note:** For examples in Go and Python, please visit the documentation inside the docs directory or click [here](https://github.com/runpod/pulumi-runpod-native/tree/main/docs).\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "The Runpod Pulumi provider provides resources to interact with Runpod's native APIs.",
"version": "1.2.2",
"project_urls": {
"Homepage": "https://runpod.io",
"Repository": "https://github.com/runpod/pulumi-runpod-native"
},
"split_keywords": [
"pulumi",
"runpod",
"gpus",
"ml",
"ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "189256e2b990f3e5700120c37fa5c4a5975f34e081f8056f2760019a10799a01",
"md5": "c85016d2420b22d364f06dd957a2f30c",
"sha256": "e607209c9971a630b4357c6bf6cfa1aebc4b6aba195c47bbeb7decc8d3533715"
},
"downloads": -1,
"filename": "runpod_pulumi_infra-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "c85016d2420b22d364f06dd957a2f30c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15194,
"upload_time": "2024-04-04T00:40:33",
"upload_time_iso_8601": "2024-04-04T00:40:33.929772Z",
"url": "https://files.pythonhosted.org/packages/18/92/56e2b990f3e5700120c37fa5c4a5975f34e081f8056f2760019a10799a01/runpod_pulumi_infra-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-04 00:40:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "runpod",
"github_project": "pulumi-runpod-native",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "runpod-pulumi-infra"
}