import subprocess | |
def clone_repo(repo_url, clone_path): | |
try: | |
# 调用 git clone 命令 | |
result = subprocess.run(['git', 'clone', repo_url, clone_path], check=True) | |
print(f"Repository cloned successfully to {clone_path}") | |
except subprocess.CalledProcessError as e: | |
print(f"Error cloning repository: {e}") | |
# 示例仓库 URL 和克隆路径 | |
repo_url = 'https://github.com/FunAudioLLM/CosyVoice.git' | |
clone_path = 'cuio/use1' | |
clone_repo(repo_url, clone_path) |