Publish the reviewed accumulated runtime, scheduler, profile, UI, native recipes and historical maintenance evidence. Includes Qwen GPU ASR correction and shared Anna/atelier ownership. Validated with 784 local tests, Python/JSON parsing and eight JavaScript syntax checks. Live GPU acceptance and full fresh-host restore limits remain documented.
29 lines
1.7 KiB
Python
29 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
"""NAS-side scoped source transport over the supplied Athena SSH helper.
|
|
|
|
Payload goes over stdin, not a giant shell argument. No keys are read or logged.
|
|
"""
|
|
import base64,hashlib,json,shlex,subprocess
|
|
from pathlib import Path
|
|
ROOT=Path(__file__).resolve().parents[3]
|
|
FILES=('audio_policy.py','inference.py','tts_test.py','tts_worker.py','voxcpm_test.py','server.py','voice-ui.js','deploy/stimmatelier/app.js','deploy/stimmatelier/index.html')
|
|
paths={'activate.py':ROOT/'docs/maintenance/shared-qwen/activate.py',**{'app/'+n:ROOT/n for n in FILES}}
|
|
subprocess.run(['node','--check',str(ROOT/'voice-ui.js')],check=True)
|
|
subprocess.run(['node','--check',str(ROOT/'deploy/stimmatelier/app.js')],check=True)
|
|
payload={}
|
|
for name,path in paths.items():
|
|
data=path.read_bytes();payload[name]={'data':base64.b64encode(data).decode(),'sha256':hashlib.sha256(data).hexdigest()}
|
|
remote="""import sys,json,base64,hashlib
|
|
from pathlib import Path
|
|
r=Path('/opt/athena-deck-dev/shared-qwen-activation-v2')
|
|
assert not (r/'activation.json').exists()
|
|
r.mkdir(mode=0o700,exist_ok=True)
|
|
for name,value in json.load(sys.stdin).items():
|
|
assert not Path(name).is_absolute() and '..' not in Path(name).parts
|
|
p=r/name;p.parent.mkdir(parents=True,exist_ok=True);p.write_bytes(base64.b64decode(value['data']));p.chmod(0o644)
|
|
assert hashlib.sha256(p.read_bytes()).hexdigest()==value['sha256']
|
|
print('Allowlisted shared-Qwen source transfer verified')
|
|
"""
|
|
subprocess.run(['athena-ssh','python3 -B -c '+shlex.quote(remote)],input=json.dumps(payload).encode(),check=True,timeout=60)
|
|
subprocess.run(['athena-ssh','python3 -B /opt/athena-deck-dev/shared-qwen-activation-v2/activate.py prepare --go'],check=True,timeout=240)
|