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

Class RuntimeEnvironment

lightrag/api/runtime_validation.py:15–28  ·  view source on GitHub ↗

Describes whether the current process is running in a container runtime.

Source from the content-addressed store, hash-verified

13
14@dataclass(frozen=True)
15class RuntimeEnvironment:
16 """Describes whether the current process is running in a container runtime."""
17
18 in_container: bool
19 in_docker: bool
20 in_kubernetes: bool
21
22 @property
23 def label(self) -> str:
24 if self.in_kubernetes:
25 return "Kubernetes"
26 if self.in_docker:
27 return "Docker"
28 return "host"
29
30
31def _read_cgroup_content() -> str:

Calls

no outgoing calls