Giter Site home page Giter Site logo

devpod-provider-paperspace's Introduction

Paperspace Provider for DevPod

Open in DevPod!

This is a Paperspace provider for DevPod, initially forked from https://github.com/dirien/devpod-provider-scaleway. This repository uses Paperspace's machines API to provision the machines.

Environment Variables

There are 2 environment variables that you will need to be aware of:

  1. PPS_API_KEY: The API key you generate for your account on Paperspace. You will be prompted for this when you add the provider.

    To acquire your API key, you can get it in your workspace settings on Paperspace. For more info, you can look at their docs here.

  2. SSH_FOLDER: The directory of your Paperspace SSH keys. By default, it is your ~/.ssh folder.

    DevPod will generate your keys and save them to your SSH_FOLDER. The SSH client library uses github.com/loft-sh/devpod/pkg/ssh, which will try to find id_devpod_rsa and id_devpod_rsa.pub in your SSH_FOLDER. If it can't find those files, it will generate its own.

    As of v0.0.15, this provider will automatically authorize the SSH keys in your SSH_FOLDER to your machine.

Getting started

You can install and use this provider by running the following commands:

devpod provider add github.com/dwarvesf/devpod-provider-paperspace
devpod provider use github.com/dwarvesf/devpod-provider-paperspace

Trying it out

You can use Microsoft's vscode-remote-try-node's example app to try out the provider. To keep it interactive, we'll use the openvscode IDE to run VSCode in the browser. You can run the following command to try it out:

devpod up github.com/microsoft/vscode-remote-try-node --ide openvscode

It should take a bit while it is provisioning the machine for you, but you will be emailed by Paperspace that you have created a new machine. You can reference an example output from the command here: https://app.warp.dev/block/pgQghAkqstTdyCevilplVa

You should then see a new window open to your new localhost server, running VSCode in the browser.

Customizing the workspace

You can customize the environment variables after installation by updating the DevPod provider options like so:

devpod provider use paperspace -o PPS_MACHINE_TYPE="GPU+"

With this, there are a few environment variables you should be aware of so that you can set and customize your machine type and OS:

  1. PPS_MACHINE_TYPE: The type of machine you want to use.

    The default machine type that gets provisioned uses C4, which offers 2 CPUs and 4GB of RAM. If you would like to choose a different machine type, you can reference the tables below:

    Label CPUs RAM (GB) GPU
    C4 2 4 None
    C5 4 8 None
    C6 8 16 None
    C7 12 30 None
    C8 16 60 None
    C9 24 120 None
    C10 32 244 None

    You also have the option to use machines with GPUs:

    Label CPUs RAM (GB) GPU
    GPU+ 8 30 Quadro M4000
    P4000 8 30 Quadro P4000
    P5000 8 30 Quadro P5000
    P6000 8 30 Quadro P6000
    RTX4000 8 30 Quadro RTX4000
    RTX5000 8 30 Quadro RTX5000
    P5000x2 16 60 Quadro P5000
    P6000x2 16 60 Quadro P6000
    RTX5000x2 16 60 Quadro RTX5000
    P4000x2 16 60 Quadro P4000

    You can find more info about the available machine types here.

    To edit your machine type for your workspace, manually set the environment variable when using the provider:

    devpod provider use paperspace -o PPS_MACHINE_TYPE="GPU+"
  2. PPS_MACHINE_TEMPLATE: The machine template and OS you want to use. The default template that is used when DevPod first installs the provider is t0nspur5, which runs a headless Ubuntu 22.04 server with a default disk size of 50GB.

    Paperspace comes with a handful of machine templates. They don't document it, unfortunately, so you can reference the template IDs from the table below.

    ID Agent Type Operating System Label Default Size (GB)
    tnr2oh1m WindowsDesktop Windows 10 (Server 2022) - Licensed 50
    t9taj00e LinuxHeadless CentOS 7 Server 50
    t04azgph LinuxHeadless Ubuntu 18.04 Server 50
    t0nspur5 LinuxHeadless Ubuntu 22.04 Server 50
    tkni3aa4 LinuxHeadless Ubuntu 20.04 Server 50
    tpi7gqht LinuxHeadless Ubuntu 22.04 K8s Worker 50

    You can set the PPS_MACHINE_TEMPLATE with the ID of the operating system you wish to use, like so:

    devpod provider use paperspace -o PPS_MACHINE_TEMPLATE="t9taj00e"
  3. PPS_DISK_SIZE: The disk size of the virtual machine you want to use. The default disk size is 50GB.

    You can set the provider option just like with the other environment variables. The value you set will be represented in GBs:

    devpod provider use paperspace -o PPS_DISK_SIZE="100"

devpod-provider-paperspace's People

Contributors

dependabot[bot] avatar monotykamary avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.