npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pierre78181/runpod

v0.9.14

Published

--- title: Runpod meta_desc: Provides an overview of the Runpod Provider for Pulumi. layout: package ---

Downloads

4

Readme


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

The config file for your yaml must look like this:

    encryptionsalt: v1:csrpeOgvGEc=:********************:**********+77ttjiVODP66dgB3l7+Q==
    config:
        runpod:token: 26b7e**************************************ae57

Example

{{< chooser language "typescript,go,python" >}}

{{% choosable language typescript %}}

    import * as pulumi from "@pulumi/pulumi";
    import * as runpod from "@pierre78181/runpod";

    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,
    };

{{% /choosable %}}

{{% choosable language go %}}

    package main

    import (
        "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
        "github.com/runpod/pulumi-runpod-native/tree/main/sdk/go/runpod"
    )

    func main() {
        pulumi.Run(func(ctx *pulumi.Context) error {
            testNetworkStorage, err := runpod.NewNetworkStorage(ctx, "testNetworkStorage", &runpod.NetworkStorageArgs{
                Name:         pulumi.String("testStorage1"),
                Size:         pulumi.Int(20),
                DataCenterId: pulumi.String("US-NJ"),
            })
            if err != nil {
                return err
            }
            myRandomPod, err := runpod.NewPod(ctx, "myRandomPod", &runpod.PodArgs{
                CloudType: pulumi.String("ALL"),
                NetworkVolumeId: testNetworkStorage.NetworkStorage.ApplyT(func(networkStorage runpod.NetworkStorageType) (*string, error) {
                    return &networkStorage.Id, nil
                }).(pulumi.StringPtrOutput),
                GpuCount:          pulumi.Int(1),
                VolumeInGb:        pulumi.Int(50),
                ContainerDiskInGb: pulumi.Int(50),
                MinVcpuCount:      pulumi.Int(2),
                MinMemoryInGb:     pulumi.Int(15),
                GpuTypeId:         pulumi.String("NVIDIA GeForce RTX 3070"),
                Name:              pulumi.String("RunPod Pytorch"),
                ImageName:         pulumi.String("runpod/pytorch"),
                DockerArgs:        pulumi.String(""),
                Ports:             pulumi.String("8888/http"),
                VolumeMountPath:   pulumi.String("/workspace"),
                Env: runpod.PodEnvArray{
                    &runpod.PodEnvArgs{
                        Key:   pulumi.String("JUPYTER_PASSWORD"),
                        Value: pulumi.String("rns1hunbsstltcpad22d"),
                    },
                },
            })
            if err != nil {
                return err
            }
            ctx.Export("pod", myRandomPod)
		    ctx.Export("networkStorage", testNetworkStorage)
            return nil
        })
    }

{{% /choosable %}}

{{% choosable language python %}}

    import pulumi
    import pulumi_runpod as runpod
    from loguru import logger
    import json

    def fetch_id(a):
        if type(a) == runpod.outputs.NetworkStorage:
            return a.id
        else:
            return a

    try:
        test_network_storage = runpod.NetworkStorage(
                "testNetworkStorage", name="testStorage1", size=20, data_center_id="US-NJ"
            )
        my_random_pod = runpod.Pod(
            "myRandomPod",
            cloud_type="ALL",
            network_volume_id=test_network_storage.network_storage.apply(lambda x : fetch_id(x)),
            gpu_count=1,
            volume_in_gb=50,
            container_disk_in_gb=50,
            min_vcpu_count=2,
            min_memory_in_gb=15,
            gpu_type_id="NVIDIA GeForce RTX 3070",
            name="RunPod Pytorch",
            image_name="runpod/pytorch",
            docker_args="",
            ports="8888/http",
            volume_mount_path="/workspace",
            env=[
                runpod.PodEnvArgs(
                    key="JUPYTER_PASSWORD",
                    value="rns1hunbsstltcpad22d",
                ).__dict__,
            ],
        )
        print(my_random_pod)
        pulumi.export(
            "pod",
            {
                "value": my_random_pod.pod,
            },
        )
        pulumi.export(
            "networkStorage",
            {
                "value": test_network_storage.network_storage,
            },
        )
    except Exception as e:
        logger.exception(e)

{{% /choosable %}}

{{% choosable language yaml %}}

name: provider-runpod-native runtime: yaml

    resources:
    plugins:
    providers:
        - name: runpod
    testNetworkStorage:
        type: runpod:NetworkStorage
        properties:
        name: "testStorage1"
        size: 20
        dataCenterId: "US-NJ"

    myRandomPod:
        type: runpod:Pod
        properties:
        cloudType: ALL
        networkVolumeId: ${testNetworkStorage.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" }]

    outputs:
    pod:
        value: ${myRandomPod.pod}
    networkStorage:
        value: ${testNetworkStorage.networkStorage}