MT3 / installation.py
hero-intelligent's picture
Create installation.py
bb4f912
raw
history blame contribute delete
No virus
867 Bytes
import os
os.system("pip install gradio")
import gradio as gr
from pathlib import Path
os.system("pip install gsutil")
os.system("git clone --branch=main https://github.com/google-research/t5x")
os.system("mv t5x t5x_tmp; mv t5x_tmp/* .; rm -r t5x_tmp")
os.system("sed -i 's:jax\[tpu\]:jax:' setup.py")
os.system("python3 -m pip install -e .")
os.system("python3 -m pip install --upgrade pip")
# install mt3
os.system("git clone --branch=main https://github.com/magenta/mt3")
os.system("mv mt3 mt3_tmp; mv mt3_tmp/* .; rm -r mt3_tmp")
os.system("python3 -m pip install -e .")
os.system("pip install tensorflow_cpu")
# copy checkpoints
os.system("gsutil -q -m cp -r gs://mt3/checkpoints .")
# copy soundfont (originally from https://sites.google.com/site/soundfonts4u)
os.system("gsutil -q -m cp gs://magentadata/soundfonts/SGM-v2.01-Sal-Guit-Bass-V1.3.sf2 .")