MCPcopy Create free account
hub / github.com/modelscope/modelscope / run_command

Function run_command

tests/run.py:192–202  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

190
191
192def run_command(cmd):
193 logger.info('Running command: %s' % ' '.join(cmd))
194 response = subprocess.run(
195 cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
196 try:
197 response.check_returncode()
198 logger.info(response.stdout.decode('utf8'))
199 except subprocess.CalledProcessError as error:
200 logger.error(
201 'stdout: %s, stderr: %s' %
202 (response.stdout.decode('utf8'), error.stderr.decode('utf8')))
203
204
205def install_packages(pkgs):

Callers 2

install_packagesFunction · 0.85
install_requirementsFunction · 0.85

Calls 3

infoMethod · 0.80
runMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…