-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathInstalar whisper-jax jetpack 6.0.txt
169 lines (89 loc) · 4.73 KB
/
Instalar whisper-jax jetpack 6.0.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
# ========================================= INSTALACION DE WHISPER-JAX EN JETPACK 6.0 ================================================= #
sudo apt update
sudo apt-get install build-essential
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev -y
# Instalar python 3.9 desde repositorio
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
python3.9 --version
# Instalar venv:
sudo apt install python3.9-venv
# Instalar cabeceras:
sudo apt-get install python3.9-dev
# ============ Instalar python3.9 otro metodo ===========:
wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
# Descomprimir:
$ tar -xvf Python-3.9.7.tgz
$ cd Python-3.9.7/
$ ./configure --enable-optimizations
$ make
$ sudo make altinstall
$ python3.9 --version
$ sudo apt-get install python3.9-dev
# ================ Crear entorno ==================#
$ python3.9 -m venv .myenv
$ pip install --upgrade pip setuptools
$ python3.9 -m pip install #only para verificar...
## -------------------------------------------------------------------------------
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-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/
# =========== Si no se puede compilar bazel usar version 10 del compilador g++ y gcc de igual forma =============
- 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 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++
# Volver a compilar bazel!
# Instalar TensorStore:
- Dependencia:
sudo apt-get install python3.9-dev # Already installed..
$ pip install tensorstore # Nota ejecutar esto dentro del enviroment python creado.
# Instalar whisper-jax
$ pip install git+https://github.com/sanchit-gandhi/whisper-jax.git
$ sudo apt update && sudo apt install ffmpeg
# Instalar jax cuda
# Verificar version cuda:
$ nvcc --version
$ cat /usr/include/cudnn_version.h
$ Instalar jax y jaxlib con gpu:
pip install --upgrade jax==0.4.19 jaxlib==0.4.19+cuda12.cudnn89 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install --upgrade jax
pip install --upgrade chex flax
# Si no funciona probar el sgt comando:
pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
# Retornar la version del compilador gcc a su version por defecto:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 30 --slave /usr/bin/g++ g++ /usr/bin/g++-11
# Instalar cuda-toolkit v12:
https://developer.nvidia.com/cuda-12-3-0-download-archive?target_os=Linux&target_arch=arm64-sbsa&Compilation=Native&Distribution=Ubuntu&target_version=22.04&target_type=runfile_local
$ wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux_sbsa.run
$ sudo sh cuda_12.3.0_545.23.06_linux_sbsa.run --dkms