@mytec: iter3.7.0 start, gpu calc int
This commit is contained in:
@@ -1,12 +1,29 @@
|
||||
import sys
|
||||
import platform
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
from app.api.deps import get_db
|
||||
from app.services.gpu_backend import gpu_manager
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def health_check():
|
||||
return {"status": "ok", "service": "rfcp-backend", "version": "1.1.0"}
|
||||
gpu_info = gpu_manager.get_status()
|
||||
return {
|
||||
"status": "ok",
|
||||
"service": "rfcp-backend",
|
||||
"version": "3.6.0",
|
||||
"build": "gpu" if gpu_info.get("gpu_available") else "cpu",
|
||||
"gpu": {
|
||||
"available": gpu_info.get("gpu_available", False),
|
||||
"backend": gpu_info.get("active_backend", "cpu"),
|
||||
"device": gpu_info.get("active_device", {}).get("name") if gpu_info.get("active_device") else "CPU",
|
||||
},
|
||||
"python": sys.version.split()[0],
|
||||
"platform": platform.system(),
|
||||
}
|
||||
|
||||
|
||||
@router.get("/db")
|
||||
|
||||
Reference in New Issue
Block a user