Spaces:
Running on Zero
Running on Zero
Restore working ZeroGPU probe pending CPU hosting decision
Browse files- README.md +27 -8
- app.py +31 -28
- requirements.txt +1 -2
README.md
CHANGED
|
@@ -1,14 +1,33 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
|
|
|
|
|
|
|
|
|
| 3 |
sdk: gradio
|
| 4 |
sdk_version: 6.29.1
|
| 5 |
-
python_version:
|
| 6 |
app_file: app.py
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
-
Private
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: TAO ZeroGPU Qualification
|
| 3 |
+
emoji: 🏎️
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.29.1
|
| 8 |
+
python_version: '3.10'
|
| 9 |
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
---
|
| 12 |
|
| 13 |
+
Private native CUDA compatibility probe and bounded upload smoke test, not a qualified trainer.
|
| 14 |
+
Uses included ZeroGPU allowance through a 45-second leased call. No paid Jobs
|
| 15 |
+
or dedicated hardware requested. Check the authenticated caller's included quota
|
| 16 |
+
before each call; the app itself does not know account billing balances.
|
| 17 |
+
|
| 18 |
+
Original Docker source and dashboard remain in this repository but are inactive.
|
| 19 |
+
Rollback: restore README.md from revision ba07e35a39211af7a0deda0ebd9adb2c554b4f38
|
| 20 |
+
and request CPU Basic. BINARY_PROVENANCE.json pins the two exact HF-built binaries
|
| 21 |
+
to that revision and upstream d8ab74c25df70b6a86ed101080e33d5fb785ea6f.
|
| 22 |
+
|
| 23 |
+
No CUDA initialization outside the lease. First check device discovery and a
|
| 24 |
+
three-value sine kernel in process, then the normal Rust gpu-info subprocess.
|
| 25 |
+
No fallback, trajectory parity, speedup or H200 claim. A second lease
|
| 26 |
+
must independently pass before testing training. Retained PACKAGE_MANIFEST.json
|
| 27 |
+
describes the prior Docker snapshot only; ZEROGPU_MANIFEST.json covers this overlay.
|
| 28 |
+
|
| 29 |
+
The upload test validates the exact supplied A01 track and a 6-4-2 Formula network
|
| 30 |
+
before leasing a GPU for at most 90 seconds. It repeats qualification, then runs
|
| 31 |
+
4 vehicles for 1 generation of 60 physics ticks, seed 42, proton math profile.
|
| 32 |
+
The subprocess has a 25-second timeout. It exports a candidate and receipt, not
|
| 33 |
+
an improvement claim. Real-game import compatibility and physics parity remain unverified.
|
app.py
CHANGED
|
@@ -1,33 +1,36 @@
|
|
| 1 |
-
|
| 2 |
-
import
|
| 3 |
-
import
|
| 4 |
-
from pathlib import Path
|
| 5 |
-
from server import create_app
|
| 6 |
-
from worker import run_native
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
path=(root/name).resolve()
|
| 14 |
-
if not path.is_relative_to(root.resolve()) or not path.is_file():
|
| 15 |
-
raise RuntimeError('Invalid release member')
|
| 16 |
-
if hashlib.sha256(path.read_bytes()).hexdigest()!=expected:
|
| 17 |
-
raise RuntimeError('Release integrity check failed: '+name)
|
| 18 |
-
return manifest
|
| 19 |
|
| 20 |
-
def
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
import uvicorn
|
| 30 |
-
uvicorn.run(create_app(worker=cpu_worker),host='0.0.0.0',port=7860,
|
| 31 |
-
workers=1,access_log=False)
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
+
import gradio as gr
|
| 3 |
+
from cloud_probe import run_probe
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
def cpu_smoke():
|
| 6 |
+
return run_probe(False)
|
| 7 |
|
| 8 |
+
@spaces.GPU(duration=90)
|
| 9 |
+
def gpu_smoke():
|
| 10 |
+
return run_probe(True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
def selected_smoke(backend):
|
| 13 |
+
if backend == 'cpu':
|
| 14 |
+
return cpu_smoke()
|
| 15 |
+
if backend == 'gpu':
|
| 16 |
+
return gpu_smoke()
|
| 17 |
+
raise ValueError('Choose CPU or GPU')
|
| 18 |
|
| 19 |
+
with gr.Blocks() as demo:
|
| 20 |
+
gr.Markdown('''# AI Learns To Drive — private compute test
|
| 21 |
+
Simulator by [Zorro909](https://github.com/Zorro909/driving_sim_rs).
|
| 22 |
+
UI and HF implementation by TiGa (seeker-cyber-maker).
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
Fixed synthetic network, 4 cars, 1 generation, 60 ticks. CPU runs without a GPU lease.
|
| 25 |
+
GPU uses up to 90 seconds of included allowance; check quota first. No automatic runs.
|
| 26 |
+
No user uploads; temporary model files are deleted before the receipt is returned.
|
| 27 |
+
This tests backend execution, not useful learning, performance, or full UI integration.
|
| 28 |
+
''')
|
| 29 |
+
backend=gr.Radio(choices=[('CPU — no GPU allowance needed','cpu'),('GPU — uses included GPU allowance','gpu')],value='cpu',label='Compute')
|
| 30 |
+
report=gr.JSON(label='Execution receipt')
|
| 31 |
+
gr.Button('Run selected backend',variant='primary').click(selected_smoke,inputs=backend,outputs=report,api_name='selected_smoke',concurrency_limit=1,concurrency_id='native')
|
| 32 |
+
gr.Button('Run CPU-only test').click(cpu_smoke,outputs=report,api_name='cpu_smoke',concurrency_limit=1,concurrency_id='native')
|
| 33 |
+
gr.Button('Run GPU test').click(gpu_smoke,outputs=report,api_name='gpu_smoke',concurrency_limit=1,concurrency_id='native')
|
| 34 |
+
|
| 35 |
+
if __name__=='__main__':
|
| 36 |
+
demo.queue(max_size=1).launch()
|
requirements.txt
CHANGED
|
@@ -1,2 +1 @@
|
|
| 1 |
-
|
| 2 |
-
uvicorn==0.52.1
|
|
|
|
| 1 |
+
spaces==0.51.3
|
|
|