ameva-runtime 2.3.0__tar.gz → 2.3.2__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.
- {ameva_runtime-2.3.0/python/ameva_runtime.egg-info → ameva_runtime-2.3.2}/PKG-INFO +1 -1
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/_version.py +1 -1
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/installer.py +40 -9
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2/python/ameva_runtime.egg-info}/PKG-INFO +1 -1
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/LICENSE +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/MANIFEST.in +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/README.md +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/README.pypi.md +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/profiles/validated-vulkan-profiles.json +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/pyproject.toml +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/base.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/bitnet.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/diffusion.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/llamacpp.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/stt.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/tts.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/adapters/vision.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/cli.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/core.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/detector.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/doctor.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/exceptions.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/platform.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/protocol.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/router.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/adapters/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/bindings.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/cli.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/core.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/doctor.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/exceptions.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/platform.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/profiles/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/profiles/validated-vulkan-profiles.json +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/protocol.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/py.typed +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime.egg-info/SOURCES.txt +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime.egg-info/dependency_links.txt +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime.egg-info/entry_points.txt +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime.egg-info/requires.txt +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime.egg-info/top_level.txt +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/base.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/diff.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/llm.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/stt.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/tts.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/backends/vision.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/cli.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/core.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/exceptions.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/utils/__init__.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/utils/hardware.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/termux_train/utils/monitor.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/setup.cfg +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/setup.py +0 -0
- {ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/tests/test_termux_train.py +0 -0
|
@@ -10,14 +10,35 @@ import os
|
|
|
10
10
|
import shutil
|
|
11
11
|
import sys
|
|
12
12
|
import tarfile
|
|
13
|
+
import urllib.error
|
|
13
14
|
import urllib.request
|
|
14
15
|
from dataclasses import dataclass, field
|
|
15
16
|
from pathlib import Path
|
|
16
17
|
from typing import Dict, List, Optional, Tuple
|
|
17
18
|
|
|
19
|
+
from ._version import __version__
|
|
20
|
+
|
|
18
21
|
logger = logging.getLogger("ameva_runtime.installer")
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
AMEVA_RUNTIME_GITHUB_REPO = "uno-km/ameva-runtime"
|
|
24
|
+
GITHUB_RELEASE_LATEST = f"https://github.com/{AMEVA_RUNTIME_GITHUB_REPO}/releases/latest/download"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_release_base_url() -> str:
|
|
28
|
+
"""Resolve GitHub release asset base URL dynamically via 3-tier fallback chain:
|
|
29
|
+
1. Explicit environment variable: AMEVA_RELEASE_BASE or AMEVA_RELEASE_TAG
|
|
30
|
+
2. Versioned release tag matching current package version: v{__version__}
|
|
31
|
+
3. Latest release download endpoint: GITHUB_RELEASE_LATEST
|
|
32
|
+
"""
|
|
33
|
+
if custom_base := os.environ.get("AMEVA_RELEASE_BASE"):
|
|
34
|
+
return custom_base.rstrip("/")
|
|
35
|
+
if custom_tag := os.environ.get("AMEVA_RELEASE_TAG"):
|
|
36
|
+
tag = custom_tag if custom_tag.startswith("v") else f"v{custom_tag}"
|
|
37
|
+
return f"https://github.com/{AMEVA_RUNTIME_GITHUB_REPO}/releases/download/{tag}"
|
|
38
|
+
return f"https://github.com/{AMEVA_RUNTIME_GITHUB_REPO}/releases/download/v{__version__}"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
GITHUB_RELEASE_BASE = get_release_base_url()
|
|
21
42
|
|
|
22
43
|
# Standard filesystem locations in Termux / Linux
|
|
23
44
|
HOME = Path(os.environ.get("HOME", os.path.expanduser("~")))
|
|
@@ -44,7 +65,7 @@ class AssetSpec:
|
|
|
44
65
|
description: str = ""
|
|
45
66
|
|
|
46
67
|
|
|
47
|
-
# SSOT Registry of Native Compiled Assets
|
|
68
|
+
# SSOT Registry of Native Compiled Assets
|
|
48
69
|
NATIVE_ASSETS: Dict[str, AssetSpec] = {
|
|
49
70
|
"diffusion": AssetSpec(
|
|
50
71
|
name="diffusion",
|
|
@@ -124,8 +145,8 @@ NATIVE_ASSETS: Dict[str, AssetSpec] = {
|
|
|
124
145
|
class NativeAssetManager:
|
|
125
146
|
"""1-Click Native Hardware Asset Provisioner for AMEVA Runtime."""
|
|
126
147
|
|
|
127
|
-
def __init__(self, base_url: str =
|
|
128
|
-
self.base_url = base_url
|
|
148
|
+
def __init__(self, base_url: Optional[str] = None, force: bool = False):
|
|
149
|
+
self.base_url = (base_url or get_release_base_url()).rstrip("/")
|
|
129
150
|
self.force = force
|
|
130
151
|
|
|
131
152
|
def provision_all(self, modalities: Optional[List[str]] = None) -> Dict[str, bool]:
|
|
@@ -138,7 +159,7 @@ class NativeAssetManager:
|
|
|
138
159
|
results: Dict[str, bool] = {}
|
|
139
160
|
|
|
140
161
|
print("=" * 72)
|
|
141
|
-
print(" AMEVA Runtime: Native Asset Auto-Provisioner (
|
|
162
|
+
print(f" AMEVA Runtime: Native Asset Auto-Provisioner (v{__version__})")
|
|
142
163
|
print("=" * 72)
|
|
143
164
|
print(f"[*] Base Distribution Server : {self.base_url}")
|
|
144
165
|
print(f"[*] Target System Root : {HOME}")
|
|
@@ -176,10 +197,20 @@ class NativeAssetManager:
|
|
|
176
197
|
temp_dest = target_dir / f".{spec.filename}.tmp"
|
|
177
198
|
|
|
178
199
|
try:
|
|
179
|
-
# 1. Download
|
|
200
|
+
# 1. Download with dynamic 3-tier fallback (tag -> latest)
|
|
180
201
|
print(f" -> Downloading: {spec.filename} ...")
|
|
181
|
-
req = urllib.request.Request(download_url, headers={"User-Agent": "AMEVA-Installer/
|
|
182
|
-
|
|
202
|
+
req = urllib.request.Request(download_url, headers={"User-Agent": f"AMEVA-Installer/{__version__}"})
|
|
203
|
+
try:
|
|
204
|
+
resp = urllib.request.urlopen(req, timeout=60)
|
|
205
|
+
except urllib.error.HTTPError as http_err:
|
|
206
|
+
if http_err.code == 404 and self.base_url != GITHUB_RELEASE_LATEST:
|
|
207
|
+
fallback_url = f"{GITHUB_RELEASE_LATEST}/{spec.filename}"
|
|
208
|
+
print(f" -> Release tag URL returned 404; falling back to latest release: {fallback_url}")
|
|
209
|
+
fallback_req = urllib.request.Request(fallback_url, headers={"User-Agent": f"AMEVA-Installer/{__version__}"})
|
|
210
|
+
resp = urllib.request.urlopen(fallback_req, timeout=60)
|
|
211
|
+
else:
|
|
212
|
+
raise
|
|
213
|
+
with resp, open(temp_dest, "wb") as out_f:
|
|
183
214
|
total_len = resp.headers.get("Content-Length")
|
|
184
215
|
total_bytes = int(total_len) if total_len else 0
|
|
185
216
|
downloaded = 0
|
|
@@ -271,7 +302,7 @@ class NativeAssetManager:
|
|
|
271
302
|
def provision_native_assets(
|
|
272
303
|
modalities: Optional[List[str]] = None,
|
|
273
304
|
force: bool = False,
|
|
274
|
-
base_url: str =
|
|
305
|
+
base_url: Optional[str] = None,
|
|
275
306
|
) -> Dict[str, bool]:
|
|
276
307
|
"""Programmatic entrypoint for AMEVA Native Asset Auto-Provisioning."""
|
|
277
308
|
manager = NativeAssetManager(base_url=base_url, force=force)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/adapters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime/vulkan/profiles/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ameva_runtime-2.3.0 → ameva_runtime-2.3.2}/python/ameva_runtime.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|