Skip to content

Commit 7cdcb93

Browse files
committed
[feat] GPU 사용 검증 api
1 parent 1ef657a commit 7cdcb93

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

everTale/app/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@
2020
@app.get("/")
2121
def root():
2222
return {"message": "EverTale AI 서버가 정상 실행 중입니다."}
23+
24+
@app.get("/debug/cuda")
25+
def cuda_health():
26+
import torch, os
27+
return {
28+
"cuda_available": torch.cuda.is_available(),
29+
"device_count": torch.cuda.device_count(),
30+
"current_device": torch.cuda.current_device() if torch.cuda.is_available() else None,
31+
"visible_devices": os.getenv("NVIDIA_VISIBLE_DEVICES", "")
32+
}

0 commit comments

Comments
 (0)