-
Notifications
You must be signed in to change notification settings - Fork 7
/
Instalar whisper-jax jetpack 5.1.1.txt
209 lines (109 loc) · 4.96 KB
/
Instalar whisper-jax jetpack 5.1.1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# verificar version de python disponibles: ╰─>
$ apt search python3 | grep "python3\."
# Instalar el venv:
# Instalar nueva version de python:
$ sudo apt install python3.9
$ sudo apt install python3.9-venv
# Instalar binutils
$ sudo apt install binutils
# Correr el comando python3, se verifica que aún esta la versión antigua.
# Ver binarios de python para verificar que se instalo:
cd /usr/bin
ls python3*
# Ver enlance simbolico actual de python:
ls -ll python3
# Actualizar pip
python3.9 -m ensurepip --upgrade
# Instalar una libreria con pip de python3.9
python3.9 -m pip install SomePackage!!
# ========================= Crear entorno virtual =================================:
$ cd /home/orin/Documents/
$ makdir python_test
$ cd python_test
# Crear entorno:
$ python3.9 -m venv .envtest
# Mostrar directorio del ven oculto:
$ ls -la
# Activar enviroment:
$ source .envtest/bin/activate
# Instalar alguna libreria........
Actualizar pip:
pip install --upgrade pip
# Correr python y verificar version e importar librerias....
$ python #Nota aún estamos dentro del venviroment.
# Desactivar/salir del virtual enviroment creado:
$ deactivate
## -------------------------------------------------------------------------------
Instalar bazel para aarch64:
- Dependencias:
sudo apt-get install build-essential openjdk-11-jdk python zip unzip
wget https://github.com/bazelbuild/bazel/releases/download/1.2.1/bazel-1.2.1-dist.zip
unzip bazel-1.2.1-dist.zip -d bazel bazel-1.2.1-dist
cd bazel-1.2.1-dist/
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
# Solución si da error lo de arriba ejecutar lo siguiente::
Primero crear carpeta dentro de /home llamada "bazel_build"
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk --distdir=/home/bazel_build" bash ./compile.sh
# Comentar linea de codigo si da error: gettid()..
sed -i 's/static long gettid(void) { return syscall(__NR_gettid); }//' third_party/grpc/src/core/lib/gpr/log_linux.cc
# Si todo fue exitoso, puedes copiar el ejecutable bazel a un directorio en tu PATH para facilitar su uso.
sudo cp output/bazel /usr/local/bin/
# Instalar TensorStore:
- Dependencia:
sudo apt-get install python3.9-dev
pip install tensorstore (Sin embargo dará error ya que necesitamos tener el compilador gcc y g++ versión 10)
- Versión actual de ubuntu 20.04 (jetpack 5.1.1)
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
- Actualizar versión de gcc:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-10
Actualizar la versión:
Probar opción 1:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
Si luego de ejecutar gcc --version Se obtiene la version antigua, entonces ejecutar:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 20 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- Verificar la versión ejecutando gcc --version.
# Actualizar g++
g++ :
Forma tradicional:
sudo apt-get purge g++
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential g++-10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
sudo update-alternatives --config g++
# Si con la forma tradicional no se puede actualizar la versión entonces solo crear enlace simbolico:
which g++-10
sudo ln -sf /usr/bin/g++-10 /usr/bin/g++
# Instalar ahora si tensorstore
$ pip install tensorstore
$ pip install git+https://github.com/sanchit-gandhi/whisper-jax.git
# Nota: Recomendable Instalar jax 0.4.5 y jaxlib 0.4.4 ya que asi lo requiere whisper-jax según la documentación.
Sin embargo podemos instalar desde pip:
$ pip install jax jaxlib
$ pip install --upgrade jax jaxlib flax
FIN DEL VIDEO.
Build from source (No realizado..):
1. Descargar la version jax-v0.4.5
https://github.com/google/jax/releases/tag/jax-v0.4.5
To build jaxlib without CUDA GPU or TPU support (CPU only), you can run:
unzip jax-v0.4.5 -d jax
cd jax..
# Construir:
python build/build.py
# Instalar jaxlib
pip install dist/*.whl # installs jaxlib (includes XLA)
# jax cuda
# Verificar version:
cat /usr/include/cudnn_version.h
pip install --upgrade jax==0.4.8 jaxlib==0.4.19+cuda12.cudnn89 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install --upgrade jax
pip install --upgrade flax
pip install --upgrade "jax[cuda11_local]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install --upgrade jax[cuda] jaxlib chex flax orbax-checkpoint
pip install cython-pocketfft
pip install flax==0.6.6 (compatible con jax 0.4.5/0.4.6)
pip install orbax-checkpoint==0.1.8
orbax-checkpoint 0.1.8 requires jax>=0.4.8, but you have jax 0.4.6 which is incompatible.