voltagegpu-cli 1.0.0__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ name: Build and Publish Python Package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Version to release'
8
+ required: true
9
+ type: string
10
+
11
+ jobs:
12
+ build:
13
+ name: Build Python distribution
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v4
20
+ with:
21
+ python-version: '3.10'
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ pip install setuptools wheel twine build toml
27
+
28
+ - name: Build package
29
+ run: python -m build --sdist --wheel --outdir dist/
30
+
31
+ - name: Upload artifact
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ approve-and-publish:
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ environment: release
41
+ permissions:
42
+ contents: read
43
+ id-token: write
44
+
45
+ steps:
46
+ - name: Download artifact
47
+ uses: actions/download-artifact@v4
48
+ with:
49
+ name: dist
50
+ path: dist/
51
+
52
+ - name: Publish package distributions to PyPI
53
+ uses: pypa/gh-action-pypi-publish@release/v1
54
+ with:
55
+ verbose: true
56
+ print-hash: true
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.11"
7
+
8
+ python:
9
+ install:
10
+ - method: pip
11
+ path: .
12
+ - requirements: docs/requirements.txt
13
+
14
+ sphinx:
15
+ configuration: docs/conf.py
@@ -0,0 +1,61 @@
1
+ # Changelog
2
+
3
+ All notable changes to `voltagegpu-cli` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.2.0] — 2026-04-11
9
+
10
+ This release realigns the CLI with the VoltageGPU product: **Confidential
11
+ Compute only**. Legacy GPU-cloud commands that were never wired up to the
12
+ published entry point have been removed and replaced with a first-class `cc`
13
+ command group backed by the public `/volt/pods` API.
14
+
15
+ ### Added
16
+ - `volt cc inventory` — list available Confidential Compute GPU tiers with
17
+ prices and availability.
18
+ - `volt cc deploy` — deploy a hardware-attested Intel TDX pod via
19
+ `POST /volt/pods` with `provider: "targon"`.
20
+ - `volt pods ssh` now prefers the server-provided `ssh_command` when present.
21
+ - `volt config` shows the effective SDK configuration with the API key masked.
22
+ - JSON output (`--json`) on every list command.
23
+ - `VoltageGPUClient.create_confidential_pod()` and
24
+ `VoltageGPUClient.list_confidential_inventory()` in the Python SDK.
25
+
26
+ ### Changed
27
+ - **BREAKING:** default API base URL is now
28
+ `https://api.voltagegpu.com/api` (was `https://voltagegpu.com/api`).
29
+ - **BREAKING:** `VoltageGPUClient.create_confidential_pod()` now calls
30
+ `POST /volt/pods` with `provider: "targon"`. The previous implementation
31
+ hit the internal `/targon/deploy` proxy, which is session-authenticated
32
+ and never worked with an `X-API-Key`.
33
+ - CLI user-agent updated to `VoltageGPU-CLI/1.2.0`.
34
+ - The package now ships a single CLI module (`volt/cli/cli.py`). The unused
35
+ `volt/cli/main.py` entry has been removed.
36
+
37
+ ### Removed
38
+ - **BREAKING:** `volt pods create --template …` and related template commands
39
+ (`volt templates list/get`). Pods are now deployed via `volt cc deploy`.
40
+ - **BREAKING:** `volt pods start` — the Confidential Compute provider does
41
+ not support restarting a stopped pod. Use `volt cc deploy` to launch a
42
+ fresh one.
43
+ - **BREAKING:** `volt machines list` — superseded by `volt cc inventory`.
44
+ - **BREAKING:** `volt finetune …` command group. Fine-tuning is not part of
45
+ the current VoltageGPU product.
46
+ - **BREAKING:** SDK helpers `create_pod`, `start_pod`, `list_templates`,
47
+ `get_template`, `list_machines`, and every `*_finetune_*` method.
48
+ - Dead SDK modules (`models.py`, `decorators.py`, `exceptions.py`,
49
+ `utils.py`) that were carried over from an older fork.
50
+ - `LIUM_API_KEY` / `LIUM_BASE_URL` fallbacks and the bundled legacy fork.
51
+
52
+ ### Fixed
53
+ - The `cc` command group was previously defined in an orphaned file that the
54
+ published entry point never imported. `volt cc …` now actually works when
55
+ installed from PyPI.
56
+
57
+ ## [1.1.0] — Previous release
58
+
59
+ Legacy build. Shipped an `X-API-Key` SDK and assorted template-based pod
60
+ commands; the `cc` command group was present in the source tree but not
61
+ wired up to the published `volt` entry point.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Datura
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,211 @@
1
+ Metadata-Version: 2.4
2
+ Name: voltagegpu-cli
3
+ Version: 1.2.0
4
+ Summary: VoltageGPU CLI — Deploy and manage Confidential Compute (Intel TDX) GPU pods from the command line.
5
+ Project-URL: Homepage, https://voltagegpu.com
6
+ Project-URL: Documentation, https://docs.voltagegpu.com
7
+ Project-URL: Repository, https://github.com/voltagegpu/voltagegpu-cli
8
+ Project-URL: Issues, https://github.com/voltagegpu/voltagegpu-cli/issues
9
+ Author-email: VoltageGPU <support@voltagegpu.com>
10
+ License-File: LICENSE
11
+ Keywords: ai,attestation,cli,cloud,confidential-compute,gpu,intel-tdx,tee,trusted-execution,voltagegpu
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Security
24
+ Classifier: Topic :: System :: Distributed Computing
25
+ Requires-Python: >=3.9
26
+ Requires-Dist: click>=8.0
27
+ Requires-Dist: httpx>=0.24.0
28
+ Requires-Dist: rich>=13.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: black; extra == 'dev'
31
+ Requires-Dist: build; extra == 'dev'
32
+ Requires-Dist: pytest; extra == 'dev'
33
+ Requires-Dist: ruff; extra == 'dev'
34
+ Requires-Dist: twine; extra == 'dev'
35
+ Requires-Dist: wheel; extra == 'dev'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # VoltageGPU CLI
39
+
40
+ **Confidential AI Infrastructure from the command line.**
41
+
42
+ `voltagegpu-cli` lets you deploy and manage **Confidential Compute** GPU pods on
43
+ [VoltageGPU](https://voltagegpu.com) — hardware-attested Intel TDX environments
44
+ with AES memory encryption and Protected PCIe, built for regulated workloads
45
+ that cannot trust the host.
46
+
47
+ ## Install
48
+
49
+ ```bash
50
+ pip install voltagegpu-cli
51
+ ```
52
+
53
+ Or from source:
54
+
55
+ ```bash
56
+ git clone https://github.com/voltagegpu/voltagegpu-cli.git
57
+ cd voltagegpu-cli
58
+ pip install -e .
59
+ ```
60
+
61
+ ## Configure
62
+
63
+ Get an API key from [voltagegpu.com](https://voltagegpu.com) and set it:
64
+
65
+ ```bash
66
+ export VOLT_API_KEY="your_api_key_here"
67
+ ```
68
+
69
+ Or create `~/.volt/config.ini`:
70
+
71
+ ```ini
72
+ [api]
73
+ api_key = your_api_key_here
74
+ ```
75
+
76
+ ## Quick start
77
+
78
+ ```bash
79
+ # Browse available Confidential Compute GPU tiers
80
+ volt cc inventory
81
+
82
+ # Register your SSH public key
83
+ volt ssh-keys add --name laptop --file ~/.ssh/id_ed25519.pub
84
+
85
+ # Deploy a hardware-attested pod
86
+ volt cc deploy --name my-pod --resource h200-small --image ubuntu:22.04
87
+
88
+ # List running pods
89
+ volt pods list
90
+
91
+ # Print the SSH command
92
+ volt pods ssh <pod_id>
93
+
94
+ # Stop or delete
95
+ volt pods stop <pod_id>
96
+ volt pods delete <pod_id>
97
+ ```
98
+
99
+ ## Commands
100
+
101
+ ### Confidential Compute
102
+
103
+ ```bash
104
+ volt cc inventory # list available GPU tiers + prices
105
+ volt cc deploy --name NAME \ # deploy a pod
106
+ --resource TIER \
107
+ --image ubuntu:22.04 \
108
+ [--ssh-key <uid>]
109
+ ```
110
+
111
+ ### Pods
112
+
113
+ ```bash
114
+ volt pods list [--json]
115
+ volt pods get <pod_id>
116
+ volt pods ssh <pod_id>
117
+ volt pods stop <pod_id>
118
+ volt pods delete <pod_id> [--yes]
119
+ ```
120
+
121
+ ### SSH keys
122
+
123
+ ```bash
124
+ volt ssh-keys list [--json]
125
+ volt ssh-keys add --name LABEL (--file PATH | --key "ssh-ed25519 AAAA…")
126
+ volt ssh-keys delete <key_id> [--yes]
127
+ ```
128
+
129
+ ### Account
130
+
131
+ ```bash
132
+ volt account balance
133
+ volt account info
134
+ volt config # show current SDK config (masked)
135
+ ```
136
+
137
+ All list commands support `--json` for machine-readable output.
138
+
139
+ ## Python SDK
140
+
141
+ ```python
142
+ from volt import VoltageGPUClient
143
+
144
+ with VoltageGPUClient() as client:
145
+ # Browse inventory
146
+ for item in client.list_confidential_inventory():
147
+ print(item["display_name"], item["final_price_per_hour"])
148
+
149
+ # Deploy a pod
150
+ result = client.create_confidential_pod(
151
+ name="training-run",
152
+ resource_name="h200-small",
153
+ image="ubuntu:22.04",
154
+ )
155
+ pod = result["pod"]
156
+ print(f"Deployed {pod['targonUid']} — {pod['ssh_command']}")
157
+
158
+ # List, stop, delete
159
+ for pod in client.list_pods():
160
+ print(pod.name, pod.status, pod.hourly_price)
161
+
162
+ client.stop_pod(pod.id)
163
+ client.delete_pod(pod.id)
164
+ ```
165
+
166
+ ### Custom configuration
167
+
168
+ ```python
169
+ from volt.sdk import Config, VoltageGPUClient
170
+
171
+ client = VoltageGPUClient(
172
+ config=Config(
173
+ api_key="your_api_key",
174
+ base_url="https://api.voltagegpu.com/api",
175
+ )
176
+ )
177
+ ```
178
+
179
+ ## Environment variables
180
+
181
+ | Variable | Description | Default |
182
+ |------------------|-----------------------------|--------------------------------------|
183
+ | `VOLT_API_KEY` | Your VoltageGPU API key | — |
184
+ | `VOLT_BASE_URL` | API base URL | `https://api.voltagegpu.com/api` |
185
+
186
+ ## Examples
187
+
188
+ ### Stop every running pod
189
+
190
+ ```bash
191
+ volt pods list --json | \
192
+ jq -r '.[] | select(.status == "RUNNING") | .id' | \
193
+ xargs -I {} volt pods stop {}
194
+ ```
195
+
196
+ ### Pick the cheapest H200 tier
197
+
198
+ ```bash
199
+ volt cc inventory --json | \
200
+ jq 'map(select(.display_name | test("H200"))) | sort_by(.final_price_per_hour)[0]'
201
+ ```
202
+
203
+ ## Support
204
+
205
+ - Website: https://voltagegpu.com
206
+ - Docs: https://docs.voltagegpu.com
207
+ - Email: support@voltagegpu.com
208
+
209
+ ## License
210
+
211
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,174 @@
1
+ # VoltageGPU CLI
2
+
3
+ **Confidential AI Infrastructure from the command line.**
4
+
5
+ `voltagegpu-cli` lets you deploy and manage **Confidential Compute** GPU pods on
6
+ [VoltageGPU](https://voltagegpu.com) — hardware-attested Intel TDX environments
7
+ with AES memory encryption and Protected PCIe, built for regulated workloads
8
+ that cannot trust the host.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install voltagegpu-cli
14
+ ```
15
+
16
+ Or from source:
17
+
18
+ ```bash
19
+ git clone https://github.com/voltagegpu/voltagegpu-cli.git
20
+ cd voltagegpu-cli
21
+ pip install -e .
22
+ ```
23
+
24
+ ## Configure
25
+
26
+ Get an API key from [voltagegpu.com](https://voltagegpu.com) and set it:
27
+
28
+ ```bash
29
+ export VOLT_API_KEY="your_api_key_here"
30
+ ```
31
+
32
+ Or create `~/.volt/config.ini`:
33
+
34
+ ```ini
35
+ [api]
36
+ api_key = your_api_key_here
37
+ ```
38
+
39
+ ## Quick start
40
+
41
+ ```bash
42
+ # Browse available Confidential Compute GPU tiers
43
+ volt cc inventory
44
+
45
+ # Register your SSH public key
46
+ volt ssh-keys add --name laptop --file ~/.ssh/id_ed25519.pub
47
+
48
+ # Deploy a hardware-attested pod
49
+ volt cc deploy --name my-pod --resource h200-small --image ubuntu:22.04
50
+
51
+ # List running pods
52
+ volt pods list
53
+
54
+ # Print the SSH command
55
+ volt pods ssh <pod_id>
56
+
57
+ # Stop or delete
58
+ volt pods stop <pod_id>
59
+ volt pods delete <pod_id>
60
+ ```
61
+
62
+ ## Commands
63
+
64
+ ### Confidential Compute
65
+
66
+ ```bash
67
+ volt cc inventory # list available GPU tiers + prices
68
+ volt cc deploy --name NAME \ # deploy a pod
69
+ --resource TIER \
70
+ --image ubuntu:22.04 \
71
+ [--ssh-key <uid>]
72
+ ```
73
+
74
+ ### Pods
75
+
76
+ ```bash
77
+ volt pods list [--json]
78
+ volt pods get <pod_id>
79
+ volt pods ssh <pod_id>
80
+ volt pods stop <pod_id>
81
+ volt pods delete <pod_id> [--yes]
82
+ ```
83
+
84
+ ### SSH keys
85
+
86
+ ```bash
87
+ volt ssh-keys list [--json]
88
+ volt ssh-keys add --name LABEL (--file PATH | --key "ssh-ed25519 AAAA…")
89
+ volt ssh-keys delete <key_id> [--yes]
90
+ ```
91
+
92
+ ### Account
93
+
94
+ ```bash
95
+ volt account balance
96
+ volt account info
97
+ volt config # show current SDK config (masked)
98
+ ```
99
+
100
+ All list commands support `--json` for machine-readable output.
101
+
102
+ ## Python SDK
103
+
104
+ ```python
105
+ from volt import VoltageGPUClient
106
+
107
+ with VoltageGPUClient() as client:
108
+ # Browse inventory
109
+ for item in client.list_confidential_inventory():
110
+ print(item["display_name"], item["final_price_per_hour"])
111
+
112
+ # Deploy a pod
113
+ result = client.create_confidential_pod(
114
+ name="training-run",
115
+ resource_name="h200-small",
116
+ image="ubuntu:22.04",
117
+ )
118
+ pod = result["pod"]
119
+ print(f"Deployed {pod['targonUid']} — {pod['ssh_command']}")
120
+
121
+ # List, stop, delete
122
+ for pod in client.list_pods():
123
+ print(pod.name, pod.status, pod.hourly_price)
124
+
125
+ client.stop_pod(pod.id)
126
+ client.delete_pod(pod.id)
127
+ ```
128
+
129
+ ### Custom configuration
130
+
131
+ ```python
132
+ from volt.sdk import Config, VoltageGPUClient
133
+
134
+ client = VoltageGPUClient(
135
+ config=Config(
136
+ api_key="your_api_key",
137
+ base_url="https://api.voltagegpu.com/api",
138
+ )
139
+ )
140
+ ```
141
+
142
+ ## Environment variables
143
+
144
+ | Variable | Description | Default |
145
+ |------------------|-----------------------------|--------------------------------------|
146
+ | `VOLT_API_KEY` | Your VoltageGPU API key | — |
147
+ | `VOLT_BASE_URL` | API base URL | `https://api.voltagegpu.com/api` |
148
+
149
+ ## Examples
150
+
151
+ ### Stop every running pod
152
+
153
+ ```bash
154
+ volt pods list --json | \
155
+ jq -r '.[] | select(.status == "RUNNING") | .id' | \
156
+ xargs -I {} volt pods stop {}
157
+ ```
158
+
159
+ ### Pick the cheapest H200 tier
160
+
161
+ ```bash
162
+ volt cc inventory --json | \
163
+ jq 'map(select(.display_name | test("H200"))) | sort_by(.final_price_per_hour)[0]'
164
+ ```
165
+
166
+ ## Support
167
+
168
+ - Website: https://voltagegpu.com
169
+ - Docs: https://docs.voltagegpu.com
170
+ - Email: support@voltagegpu.com
171
+
172
+ ## License
173
+
174
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env python3
2
+ """Deploy a Confidential Compute pod via the VoltageGPU Python SDK.
3
+
4
+ Requires VOLT_API_KEY in the environment. Picks the cheapest available
5
+ H200 tier from the inventory and launches an Ubuntu 22.04 pod.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from volt import VoltageGPUClient
11
+
12
+
13
+ def pick_cheapest_h200(inventory: list[dict]) -> dict | None:
14
+ """Return the cheapest available tier whose display name mentions H200."""
15
+ candidates = [
16
+ item
17
+ for item in inventory
18
+ if "H200" in str(item.get("display_name", ""))
19
+ and int(item.get("available", 0)) > 0
20
+ ]
21
+ if not candidates:
22
+ return None
23
+ return min(candidates, key=lambda item: float(item.get("final_price_per_hour", 0)))
24
+
25
+
26
+ def main() -> int:
27
+ with VoltageGPUClient() as client:
28
+ inventory = client.list_confidential_inventory()
29
+ if not inventory:
30
+ print("No Confidential Compute GPUs available.")
31
+ return 1
32
+
33
+ tier = pick_cheapest_h200(inventory)
34
+ if not tier:
35
+ print("No H200 tier available right now.")
36
+ return 1
37
+
38
+ print(
39
+ f"Deploying on {tier['display_name']} "
40
+ f"(${float(tier['final_price_per_hour']):.2f}/hr)..."
41
+ )
42
+
43
+ result = client.create_confidential_pod(
44
+ name="cc-demo",
45
+ resource_name=tier["name"],
46
+ image="ubuntu:22.04",
47
+ )
48
+
49
+ if not result.get("success"):
50
+ print("Deployment failed:", result.get("error"))
51
+ return 1
52
+
53
+ pod = result["pod"]
54
+ print("Deployed:", pod.get("targonUid", pod.get("id")))
55
+ print("SSH: ", pod.get("ssh_command"))
56
+ return 0
57
+
58
+
59
+ if __name__ == "__main__":
60
+ raise SystemExit(main())