voltagegpu-cli 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl
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.
- volt/__init__.py +5 -5
- volt/cli/vgpu.py +12 -2
- volt/sdk/remote.py +11 -0
- {voltagegpu_cli-2.0.0.dist-info → voltagegpu_cli-2.0.1.dist-info}/METADATA +1 -1
- {voltagegpu_cli-2.0.0.dist-info → voltagegpu_cli-2.0.1.dist-info}/RECORD +8 -8
- {voltagegpu_cli-2.0.0.dist-info → voltagegpu_cli-2.0.1.dist-info}/WHEEL +0 -0
- {voltagegpu_cli-2.0.0.dist-info → voltagegpu_cli-2.0.1.dist-info}/entry_points.txt +0 -0
- {voltagegpu_cli-2.0.0.dist-info → voltagegpu_cli-2.0.1.dist-info}/licenses/LICENSE +0 -0
volt/__init__.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"""VoltageGPU command-line interface and Python SDK."""
|
|
2
|
-
|
|
3
|
-
__version__ = "2.0.
|
|
4
|
-
|
|
5
|
-
__all__ = ["__version__"]
|
|
1
|
+
"""VoltageGPU command-line interface and Python SDK."""
|
|
2
|
+
|
|
3
|
+
__version__ = "2.0.1"
|
|
4
|
+
|
|
5
|
+
__all__ = ["__version__"]
|
volt/cli/vgpu.py
CHANGED
|
@@ -97,6 +97,13 @@ def ssh_key_needed(exc: ApiError, kind: str, given: bool, how: str) -> Optional[
|
|
|
97
97
|
"`voltagegpu ssh-keys list`). Nothing was charged.", "SSH_KEY_ID_REQUIRED", {"http_status": 400})
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
def _cents(values: Any) -> Any:
|
|
101
|
+
"""Budgets and spend shown to a human, to the cent (a float sum prints 0.18999999999999995)."""
|
|
102
|
+
if not isinstance(values, Mapping):
|
|
103
|
+
return values
|
|
104
|
+
return {k: round(v, 2) if isinstance(v, (int, float)) and not isinstance(v, bool) else v for k, v in values.items()}
|
|
105
|
+
|
|
106
|
+
|
|
100
107
|
def _emit(as_json: bool, data: Any, human: str) -> None:
|
|
101
108
|
click.echo(json.dumps(data, indent=2, default=str) if as_json else human)
|
|
102
109
|
|
|
@@ -384,7 +391,10 @@ def attest_cmd(ctx: click.Context, ref: str, offline: bool, out: Optional[str],
|
|
|
384
391
|
"""Prove the machine is a genuine TEE: challenge drawn here, proofs made in the VM, checked here."""
|
|
385
392
|
data, code = attest_machine(_state(ctx).client(), ref, out=out, offline=offline, identity=identity, vmpl=vmpl)
|
|
386
393
|
failed = data.get("failed") or []
|
|
387
|
-
|
|
394
|
+
# 2.0.1: a VM verdict covers the NVIDIA GPU too; say so when its checks passed.
|
|
395
|
+
gpu_checked = any(str(c.get("name", "")).startswith("nvidia.") and c.get("ok") for c in data.get("checks") or [])
|
|
396
|
+
tee = f"{data['tee']} + NVIDIA GPU" if data.get("verified") and gpu_checked else data["tee"]
|
|
397
|
+
human = f"{data['status']}: {tee}, challenge {data['challenge'][:16]}..." + (f" failed: {', '.join(failed)}" if failed else "")
|
|
388
398
|
if data.get("detail"):
|
|
389
399
|
human += f" ({data['detail']})"
|
|
390
400
|
if (data.get("facts") or {}).get("vmpl_fallback"):
|
|
@@ -415,7 +425,7 @@ def whoami_cmd(ctx: click.Context, as_json: bool) -> None:
|
|
|
415
425
|
lines: List[str] = [f"key {data['key']['masked']} {key.get('name') or ''}".rstrip(),
|
|
416
426
|
f"scopes {', '.join(key.get('scopes') or []) or 'full access'}",
|
|
417
427
|
f"machines {key.get('pod_visibility') or 'account'}",
|
|
418
|
-
f"budgets {json.dumps(key.get('budgets_usd') or {})} spent {json.dumps(key.get('spent_usd') or {})}",
|
|
428
|
+
f"budgets {json.dumps(_cents(key.get('budgets_usd') or {}))} spent {json.dumps(_cents(key.get('spent_usd') or {}))}",
|
|
419
429
|
f"balance {data['balance']} {data['currency']}" if data["balance"] is not None
|
|
420
430
|
else f"balance hidden ({data['balance_hidden']})"]
|
|
421
431
|
_emit(as_json, data, "\n".join(lines))
|
volt/sdk/remote.py
CHANGED
|
@@ -13,6 +13,7 @@ are reused by other machines after a release.
|
|
|
13
13
|
|
|
14
14
|
from __future__ import annotations
|
|
15
15
|
|
|
16
|
+
import os
|
|
16
17
|
import re
|
|
17
18
|
import shlex
|
|
18
19
|
from pathlib import Path
|
|
@@ -48,7 +49,17 @@ def ssh_options(pod_id: str, home: Optional[Path] = None) -> List[str]:
|
|
|
48
49
|
]
|
|
49
50
|
|
|
50
51
|
|
|
52
|
+
_WINDOWS_PATH_RE = re.compile(r"^[A-Za-z]:[\/]")
|
|
53
|
+
|
|
54
|
+
|
|
51
55
|
def validate_remote_path(path: str) -> str:
|
|
56
|
+
if path and _WINDOWS_PATH_RE.match(path):
|
|
57
|
+
# Git Bash (MSYS) rewrites an absolute remote path such as /tmp/out.tgz into C:/.../Temp/out.tgz.
|
|
58
|
+
hint = "Git Bash rewrote an absolute remote path into a Windows one; " if os.environ.get("MSYSTEM") else ""
|
|
59
|
+
raise RemotePathError(
|
|
60
|
+
f"Refusing remote path {path!r}: it is a Windows path. {hint}"
|
|
61
|
+
"Use a path relative to the remote home (out.tgz), or run with MSYS_NO_PATHCONV=1."
|
|
62
|
+
)
|
|
52
63
|
if not path or path.startswith("-") or not _REMOTE_PATH_RE.fullmatch(path):
|
|
53
64
|
raise RemotePathError(
|
|
54
65
|
f"Refusing remote path {path!r}: use letters, digits and ./_~-+@=,% only (no spaces or shell characters)."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: voltagegpu-cli
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: VoltageGPU CLI and Python SDK: Confidential VMs (Intel TDX), Confidential CPU (AMD SEV-SNP), standard GPU pods, dedicated machines and sandboxes, with the vgpu command for scripts and AI agents.
|
|
5
5
|
Project-URL: Homepage, https://voltagegpu.com
|
|
6
6
|
Project-URL: Documentation, https://docs.voltagegpu.com/cli
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
volt/__init__.py,sha256=
|
|
1
|
+
volt/__init__.py,sha256=IkJdRjdT9xpskKaJueeGqu6ItQ5QQwtZt00Okboo4y0,106
|
|
2
2
|
volt/__main__.py,sha256=mxzyZJsRIIjJ39O6PLrxBQYskEekGI7ZrS-bOjwqakw,73
|
|
3
3
|
volt/cli/__init__.py,sha256=AOR6FpkQfm5WaS_yMyneHgc_6xxMA8UTERqyrAOw-3g,93
|
|
4
4
|
volt/cli/cmd_account.py,sha256=FkXSXjNBmCy-BxEny8PgbopoRRIq1c4-hAI6VpoVs3c,7546
|
|
@@ -9,7 +9,7 @@ volt/cli/cmd_pods.py,sha256=6mSmjDEfN_onaq5r2MzNgQFiaRCPrViwcuOzv1CvQ2I,8280
|
|
|
9
9
|
volt/cli/main.py,sha256=l7--Qz60E8lMpppAOh05WiRN6Rk8ZnBoguBO1MDkejk,4872
|
|
10
10
|
volt/cli/output.py,sha256=G9Ibq84rjnMsrJyUr4Glg2Sdy6PuNMBVzxSxk_FtDmo,2997
|
|
11
11
|
volt/cli/state.py,sha256=8YmCYUUbJnJvkFRL-muVjqXD5w0r9OTYbMYzmBM0-LA,1057
|
|
12
|
-
volt/cli/vgpu.py,sha256=
|
|
12
|
+
volt/cli/vgpu.py,sha256=7jcRQ6e21A-He6XcPVIylu4qkaHyzs1xWauYpFL14JU,24938
|
|
13
13
|
volt/mcp/__init__.py,sha256=rJ3qTU75sqQ75Q-l64m-c6-9XBM8dVGyxgbcQGGxFyE,55
|
|
14
14
|
volt/mcp/server.py,sha256=iypa3MUynv4JUd763qVQulM9X1y0crFNhHmN1CY7abI,20264
|
|
15
15
|
volt/sdk/__init__.py,sha256=3E9TIM3bGK-q3FSUZNdqFgk8EujMtG6TyWvPvQyVyXE,1026
|
|
@@ -20,13 +20,13 @@ volt/sdk/config.py,sha256=wASGK9vQxZX1f3CFCwbmsHCBVBRK3fZ8AHBPh9o19YY,7694
|
|
|
20
20
|
volt/sdk/errors.py,sha256=btO10yGOf8qz9bH4s6Li2bVBcqJdZm2tmiACgu4aQHQ,2787
|
|
21
21
|
volt/sdk/fleet.py,sha256=oNHnCNbtT12NJjppIXwCTIyCGrC6wcsaeX9CVF-wn70,10434
|
|
22
22
|
volt/sdk/models.py,sha256=t6x-IqmxGLjfRNV9TZLiS4kiTeBFiriz-j0iCKnaOVo,12269
|
|
23
|
-
volt/sdk/remote.py,sha256=
|
|
23
|
+
volt/sdk/remote.py,sha256=jvjAyDxiZCdHx8rbEU7AtgJEGKM_C2cbxLYhidi8RfM,5334
|
|
24
24
|
volt/sdk/ssh.py,sha256=3AHfjfmr9sIzgZAOgwpfOptHQCQCDmyxGCPhU9oWGrk,6146
|
|
25
25
|
volt/sdk/ttl.py,sha256=fjcX91VNNfgPs7ZVv1NYicAzGvKMgMf2_T37VreTIy8,4166
|
|
26
26
|
volt/sdk/scripts/snp-proof-in-the-vm.sh,sha256=ER7l3ODybiL_kDzNHQl9nmREZ2M205ipqSfhTK5vZF0,9810
|
|
27
27
|
volt/sdk/scripts/two-proofs-in-the-vm.sh,sha256=Ec8Jz3nstDkk2cPz5uuBIKSn6AzYbjpJZ56VZoCS-eM,2601
|
|
28
|
-
voltagegpu_cli-2.0.
|
|
29
|
-
voltagegpu_cli-2.0.
|
|
30
|
-
voltagegpu_cli-2.0.
|
|
31
|
-
voltagegpu_cli-2.0.
|
|
32
|
-
voltagegpu_cli-2.0.
|
|
28
|
+
voltagegpu_cli-2.0.1.dist-info/METADATA,sha256=_sLu60nWip2InQGNzshNUxxwoaYtdy4N3m1U1cOjyko,15442
|
|
29
|
+
voltagegpu_cli-2.0.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
30
|
+
voltagegpu_cli-2.0.1.dist-info/entry_points.txt,sha256=HlcXdHCtHi2lonPMDeJEKzoEaYOYPz8UvVv344T6FAI,102
|
|
31
|
+
voltagegpu_cli-2.0.1.dist-info/licenses/LICENSE,sha256=cM60JdixftzR7QJjOPPYi2itdqg7qqFXu0I3mO2IrEU,1085
|
|
32
|
+
voltagegpu_cli-2.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|