Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Binaries for programs and plugins
.DS_STORE
*.exe
*.exe~
*.dll
*.so
*.dylib
runpodctl

# Test binary, built with `go test -c`
*.test
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# RunPod CLI
# Runpod CLI

runpodctl is the CLI tool to automate / manage GPU pods for [runpod.io](https://runpod.io).

Expand All @@ -10,7 +10,7 @@ _Note: All pods automatically come with runpodctl installed with a pod-scoped AP

## Table of Contents

- [RunPod CLI](#runpod-cli)
- [Runpod CLI](#runpod-cli)
- [Table of Contents](#table-of-contents)
- [Get Started](#get-started)
- [Install](#install)
Expand Down Expand Up @@ -57,8 +57,8 @@ Please checkout this [video tutorial](https://www.youtube.com/watch?v=QN1vdGhjcR

- [Installing the latest version of runpodctl](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=1384s)
- [Uploading large datasets](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2068s)
- [File transfers from PC to RunPod](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2106s)
- [Downloading folders from RunPod](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2549s)
- [File transfers from PC to Runpod](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2106s)
- [Downloading folders from Runpod](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2549s)
- [Adding runpodctl to your environment path](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=2589s)
- [Downloading model files](https://www.youtube.com/watch?v=QN1vdGhjcRc&t=4871s)

Expand Down Expand Up @@ -101,15 +101,15 @@ data.txt 100% |████████████████████| ( 5

### Using Google Drive

You can use the following links for google colab
You can use the following links for Google Colab

[Send](https://colab.research.google.com/drive/1UaODD9iGswnKF7SZfsvwHDGWWwLziOsr#scrollTo=2nlcIAY3gGLt)

[Receive](https://colab.research.google.com/drive/1ot8pODgystx1D6_zvsALDSvjACBF1cj6#scrollTo=RF1bMqhBOpSZ)

## Pod Commands

Before using pod commands, configure the API key obtained from your [RunPod account](https://runpod.io/console/user/settings).
Before using pod commands, configure the API key obtained from your [Runpod account](https://runpod.io/console/user/settings).

```bash
# configure API key
Expand All @@ -132,7 +132,7 @@ runpodctl start pod {podId} --bid=0.3
runpodctl stop pod {podId}
```

For a comprehensive list of commands, visit [RunPod CLI documentation](docs/runpodctl.md).
For a comprehensive list of commands, visit [Runpod CLI documentation](docs/runpodctl.md).

## Acknowledgements

Expand Down
4 changes: 1 addition & 3 deletions api/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"net/http"
"os"
"runtime"
"strings"
"time"

"github.com/spf13/viper"
Expand Down Expand Up @@ -46,8 +45,7 @@ func Query(input Input) (res *http.Response, err error) {
return
}

sanitizedVersion := strings.TrimRight(Version, "\r\n")
userAgent := "RunPod-CLI/" + sanitizedVersion + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")"
userAgent := "Runpod-CLI/" + Version + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")"

req.Header.Add("Content-Type", "application/json")
req.Header.Set("User-Agent", userAgent)
Expand Down
2 changes: 1 addition & 1 deletion api/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func GetNetworkVolumes() (volumes []*NetworkVolume, err error) {
err = errors.New(data.Errors[0].Message)
return nil, err
}
if data == nil || data.Data == nil || data.Data.Myself == nil || data.Data.Myself.NetworkVolumes == nil {
if data.Data == nil || data.Data.Myself == nil || data.Data.Myself.NetworkVolumes == nil {
err = fmt.Errorf("data is nil: %s", string(rawData))
return nil, err
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
var ConfigCmd = &cobra.Command{
Use: "config",
Short: "Manage CLI configuration",
Long: "RunPod CLI Config Settings",
Long: "Runpod CLI Config Settings",
RunE: func(c *cobra.Command, args []string) error {
if err := saveConfig(); err != nil {
return fmt.Errorf("error saving config: %w", err)
Expand Down Expand Up @@ -57,7 +57,7 @@ func getOrCreateSSHKey() ([]byte, error) {

if publicKey == nil {
fmt.Println("No existing local SSH key found, generating a new one.")
publicKey, err = ssh.GenerateSSHKeyPair("RunPod-Key-Go")
publicKey, err = ssh.GenerateSSHKeyPair("Runpod-Key-Go")
if err != nil {
return nil, fmt.Errorf("failed to generate SSH key: %w", err)
}
Expand Down Expand Up @@ -102,11 +102,11 @@ func ensureSSHKeyInCloud(publicKey []byte) error {
}

func init() {
ConfigCmd.Flags().StringVar(&apiKey, "apiKey", "", "RunPod API key")
ConfigCmd.Flags().StringVar(&apiKey, "apiKey", "", "Runpod API key")
viper.BindPFlag("apiKey", ConfigCmd.Flags().Lookup("apiKey")) //nolint
viper.SetDefault("apiKey", "")

ConfigCmd.Flags().StringVar(&apiUrl, "apiUrl", "https://api.runpod.io/graphql", "RunPod API URL")
ConfigCmd.Flags().StringVar(&apiUrl, "apiUrl", "https://api.runpod.io/graphql", "Runpod API URL")
viper.BindPFlag("apiUrl", ConfigCmd.Flags().Lookup("apiUrl")) //nolint

ConfigCmd.MarkFlagRequired("apiKey")
Expand Down
4 changes: 2 additions & 2 deletions cmd/exec/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package exec
import (
"fmt"

"github.com/runpod/runpodctl/cmd/project"
"github.com/runpod/runpodctl/cmd/ssh"
)

func PythonOverSSH(podID string, file string) error {
sshConn, err := project.PodSSHConnection(podID)
sshConn, err := ssh.PodSSHConnection(podID)
if err != nil {
return fmt.Errorf("getting SSH connection: %w", err)
}
Expand Down
20 changes: 0 additions & 20 deletions cmd/project.go

This file was deleted.

15 changes: 0 additions & 15 deletions cmd/project/defaults.go

This file was deleted.

28 changes: 0 additions & 28 deletions cmd/project/exampleDockerfile

This file was deleted.

Loading