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

Method _save_dockerfile

docker/build_image.py:67–71  ·  view source on GitHub ↗
(self, content: str)

Source from the content-addressed store, hash-verified

65 )
66
67 def _save_dockerfile(self, content: str) -> None:
68 if os.path.exists('./Dockerfile'):
69 os.remove('./Dockerfile')
70 with open('./Dockerfile', 'w') as f:
71 f.write(content)
72
73 def run_cmd(self, *args: str) -> int:
74 """Run a shell command safely via subprocess (no shell=True).

Callers 1

__call__Method · 0.95

Calls 3

existsMethod · 0.45
removeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected