whisper-tiny-sv / run_sm.py
marinone94's picture
update run sm py
8f5c8b8
raw
history blame
415 Bytes
""" Python script that triggers sagemaker flow"""
import sys
import subprocess
def main():
# Let's skip arg names
script_name = sys.argv[2]
repo = sys.argv[4]
repo_name = repo.split('/')[-1]
cmd = f'git clone {repo} && cd {repo_name} && sh {script_name}'
output = subprocess.run(cmd.split(), stdout=subprocess.PIPE)
print(output.stdout.decode())
if __name__ == '__main__':
main()