mdnestor commited on
Commit
164b991
1 Parent(s): cc11df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -2,9 +2,12 @@ import os
2
  import gradio as gr
3
  import glob
4
 
5
- os.system("pip install gsutil")
6
 
 
7
  os.system("git clone --branch=main https://github.com/google-research/t5x")
 
 
8
  os.system("mv t5x t5x_tmp; mv t5x_tmp/* .; rm -r t5x_tmp")
9
  os.system("sed -i 's:jax\[tpu\]:jax:' setup.py")
10
  os.system("python3 -m pip install -e .")
@@ -14,10 +17,9 @@ os.system("git clone --branch=main https://github.com/magenta/mt3")
14
  os.system("mv mt3 mt3_tmp; mv mt3_tmp/* .; rm -r mt3_tmp")
15
  os.system("python3 -m pip install -e .")
16
 
17
- # copy checkpoints
18
- os.system("gsutil -q -m cp -r gs://mt3/checkpoints .")
19
 
20
- # copy soundfont (originally from https://sites.google.com/site/soundfonts4u)
21
  os.system("gsutil -q -m cp gs://magentadata/soundfonts/SGM-v2.01-Sal-Guit-Bass-V1.3.sf2 .")
22
 
23
  import functools
 
2
  import gradio as gr
3
  import glob
4
 
5
+ os.system("!apt-get update -qq && apt-get install -qq libfluidsynth1 build-essential libasound2-dev libjack-dev")
6
 
7
+ # install t5x
8
  os.system("git clone --branch=main https://github.com/google-research/t5x")
9
+ # pin T5X for python 3.7 compatibility
10
+ os.system("cd t5x; git reset --hard 2e05ad41778c25521738418de805757bf2e41e9e; cd ..")
11
  os.system("mv t5x t5x_tmp; mv t5x_tmp/* .; rm -r t5x_tmp")
12
  os.system("sed -i 's:jax\[tpu\]:jax:' setup.py")
13
  os.system("python3 -m pip install -e .")
 
17
  os.system("mv mt3 mt3_tmp; mv mt3_tmp/* .; rm -r mt3_tmp")
18
  os.system("python3 -m pip install -e .")
19
 
20
+ os.system("pip install jax[cuda]==0.3.15 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html")
 
21
 
22
+ os.system("gsutil -q -m cp -r gs://mt3/checkpoints .")
23
  os.system("gsutil -q -m cp gs://magentadata/soundfonts/SGM-v2.01-Sal-Guit-Bass-V1.3.sf2 .")
24
 
25
  import functools