[Fix] Do not pin memory when in WSL (#312)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import enum
|
||||
from platform import uname
|
||||
import uuid
|
||||
|
||||
import psutil
|
||||
@@ -36,3 +37,7 @@ def get_cpu_memory() -> int:
|
||||
|
||||
def random_uuid() -> str:
|
||||
return str(uuid.uuid4().hex)
|
||||
|
||||
def in_wsl() -> bool:
|
||||
# Reference: https://github.com/microsoft/WSL/issues/4071
|
||||
return "microsoft" in " ".join(uname()).lower()
|
||||
|
||||
Reference in New Issue
Block a user