MCPcopy
hub / github.com/HKUDS/LightRAG / _read_cgroup_content

Function _read_cgroup_content

lightrag/api/runtime_validation.py:31–39  ·  view source on GitHub ↗

Best-effort read of cgroup metadata for container detection.

()

Source from the content-addressed store, hash-verified

29
30
31def _read_cgroup_content() -> str:
32 """Best-effort read of cgroup metadata for container detection."""
33
34 for candidate in ("/proc/1/cgroup", "/proc/self/cgroup"):
35 try:
36 return Path(candidate).read_text(encoding="utf-8")
37 except OSError:
38 continue
39 return ""
40
41
42def detect_runtime_environment(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected