MCPcopy Create free account
hub / github.com/apache/tvm / check_docker

Function check_docker

tests/scripts/ci.py:91–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89
90
91def check_docker():
92 executable = shutil.which("docker")
93 if executable is None:
94 clean_exit("'docker' executable not found, install it first (e.g. 'apt install docker.io')")
95
96 if sys.platform == "linux":
97 # Check that the user is in the docker group before running
98 try:
99 group = grp.getgrnam("docker")
100 if getpass.getuser() not in group.gr_mem:
101 warnings.append(
102 f"Note: User '{getpass.getuser()}' is not in the 'docker' group, either:\n"
103 " * run with 'sudo'\n"
104 " * add user to 'docker': sudo usermod -aG docker $(whoami), then log out and back in",
105 )
106 except KeyError:
107 warnings.append("Note: 'docker' group does not exist")
108
109
110def check_gpu():

Callers 1

dockerFunction · 0.85

Calls 2

clean_exitFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…