Commit 77e3df95 authored by Leon Wu's avatar Leon Wu
Browse files

try encodec branch

parent 1b9081f0
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -6,27 +6,27 @@ import zipfile
import subprocess
import shutil

zip_file_path = "audiolm-pytorch-personal-hacks.zip"
input("type anything to confirm that you have pushed the latest version of the personal_hacks branch to Github as well!!")
zip_file_path = "audiolm-pytorch-encodec-support.zip"
input("type anything to confirm that you have pushed the latest version of the encodec_support branch to Github as well!!")

if os.path.isfile(zip_file_path):
    replace = input("personal hacks zip already exists. replacing (as well as audiolm_pytorch library...)")
    os.remove(zip_file_path)
    shutil.rmtree("audiolm_pytorch")
urllib.request.urlretrieve("https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/personal_hacks.zip", zip_file_path)
urllib.request.urlretrieve("https://github.com/LWProgramming/audiolm-pytorch/archive/refs/heads/encodec_support.zip", zip_file_path)

with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
    zip_ref.extractall("audiolm-pytorch")


# install requirements from the patched audiolm-pytorch directory
subprocess.run(['pip', 'install', 'audiolm-pytorch/audiolm-pytorch-personal_hacks'])
subprocess.run(['pip', 'install', 'audiolm-pytorch/audiolm-pytorch-encodec_support'])

# move library itself to current directory
subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-personal_hacks/audiolm_pytorch', '.'])
subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-encodec_support/audiolm_pytorch', '.'])

# # move setup.py to current directory for requirements
# subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-personal_hacks/setup.py', '.'])
# subprocess.run(['mv', 'audiolm-pytorch/audiolm-pytorch-encodec_support/setup.py', '.'])

# remove the rest of the audiolm-pytorch directory
subprocess.run(['rm', '-rf', 'audiolm-pytorch'])