The Runpod Pulumi provider provides resources to interact with Runpod's native APIs.
Project description
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 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.
pulumi config set --secret runpod:token
Example
This is an example of how to deploy over typescript. We also serve pulumi over Python and Go. For more examples, please go through the examples folder or the documents inside docs.
Filename must be index.ts.
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,
};
Note: For examples in Go and Python, please visit the documentation inside the docs directory or click here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.