feat(gpu): GPU health check + RENDER_DEVICE_USED token + strict mode
- gpu_probe.py: Blender script that probes OPTIX/CUDA/HIP/ONEAPI and
exits 1 on no GPU — used at startup + on-demand from Admin UI
- blender_render.py, still_render.py, turntable_render.py: emit
RENDER_DEVICE_USED: engine=CYCLES device=GPU|CPU compute_type=...
after GPU activation; exit 2 when CYCLES_DEVICE=gpu and CPU fallback
- render_blender.py: parse RENDER_DEVICE_USED token into render_log
(device_used, compute_type, gpu_fallback); handle exit code 2 as
explicit GPU strict-mode failure
- check_version.py: check_gpu() runs gpu_probe.py at container startup;
CYCLES_DEVICE=gpu aborts startup if no GPU found
- docker-compose.yml: CYCLES_DEVICE=${CYCLES_DEVICE:-auto} env var
- gpu_tasks.py: probe_gpu Celery task on thumbnail_rendering queue;
saves result to system_settings.gpu_probe_last_result; beat every 30min
- worker.py: POST /probe/gpu (trigger) + GET /probe/gpu/result (last result)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ celery_app = Celery(
|
||||
"app.domains.products.tasks",
|
||||
"app.domains.imports.tasks",
|
||||
"app.domains.materials.tasks",
|
||||
"app.tasks.gpu_tasks",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -56,5 +57,9 @@ celery_app.conf.update(
|
||||
"task": "app.tasks.beat_tasks.apply_worker_concurrency",
|
||||
"schedule": 300.0, # every 5 minutes
|
||||
},
|
||||
"probe-gpu-every-30m": {
|
||||
"task": "app.tasks.gpu_tasks.probe_gpu",
|
||||
"schedule": 1800.0, # every 30 minutes
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user