Marcis commited on
Commit
a086463
·
verified ·
1 Parent(s): fd42ee1

Create Instalar Dependências.py

Browse files
Files changed (1) hide show
  1. Instalar Dependências.py +28 -0
Instalar Dependências.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #@title Instalar Dependências
2
+ # Downgrade to 3.10.12 until I can get around to properly fixing stuff. Credit to lucynamari and asificare.
3
+ # This will 100% break shit, but I do not have the time in my life to properly debug this or anything else in this notebook.
4
+ import subprocess
5
+
6
+ !pip install faiss-cpu
7
+ !sudo apt-get install python3.10
8
+ !sudo update-alternatives --install "/usr/bin/python3" python3 "/usr/bin/python3.10" 1
9
+ !sudo update-alternatives --install "/usr/bin/python3" python3 "/usr/bin/python3.11" 0
10
+ !sudo apt-get install python3-pip
11
+
12
+ packages = ['build-essential', 'python3-dev', 'ffmpeg', 'aria2']
13
+ pip_packages = ['setuptools', 'wheel', 'fairseq', 'ffmpeg', 'ffmpeg-python', 'praat-parselmouth', 'pyworld', 'numpy==1.23.5', 'numba==0.56.4', 'librosa==0.9.2', 'matplotlib==3.7.0', 'tensorboard']
14
+
15
+ print("Atualizando e instalando pacotes do sistema...")
16
+ for package in packages:
17
+ print(f"Instalando {package}...")
18
+ subprocess.check_call(['apt-get', 'install', '-qq', '-y', package])
19
+
20
+ print("Atualizando e instalando os pacotes pip...")
21
+
22
+ # instalar pacotes
23
+ for package in pip_packages:
24
+ print(f"Instalando {package}...")
25
+ subprocess.check_call(['pip', 'install', '--upgrade', package])
26
+
27
+ print('Pacotes atualizados.')
28
+ firsttry = True