aboutsummaryrefslogtreecommitdiff
path: root/ai/whisper.sh
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2024-03-23 14:51:41 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2024-03-23 14:52:37 -0400
commitced6104035ac43c996bd3fd3a506bc773c43472f (patch)
treed2010539bc41d3fe3adcecd52f243c5c0e55214b /ai/whisper.sh
parent07848d527a002da4174fdd2724d7326001ceff13 (diff)
downloaddotfiles-ced6104035ac43c996bd3fd3a506bc773c43472f.tar.gz
dotfiles-ced6104035ac43c996bd3fd3a506bc773c43472f.tar.xz
Source bashrc at the correct spot. Use rocm_version and set HIP visible to zero
Diffstat (limited to 'ai/whisper.sh')
-rw-r--r--ai/whisper.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/ai/whisper.sh b/ai/whisper.sh
index 3a2234c..9c469c7 100644
--- a/ai/whisper.sh
+++ b/ai/whisper.sh
@@ -59,22 +59,25 @@ bash "$miniconda_out" -b -u -p ~/miniconda3
~/miniconda3/bin/conda init bash
fi
+set +ex
+. ~/.bashrc
+set -ex
if ! conda env list | grep -q '^whisper' ; then
conda create -y --name whisper python=3.9
fi
-set +ex
-. ~/.bashrc
-set -ex
-
conda activate whisper
# https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/3rd-party/pytorch-install.html
conda install -y pytorch==2.0.0 torchaudio==2.0.0 -c pytorch
pip install -U openai-whisper
-pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm5.7/
+pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm${rocm_version}/
pip install --upgrade --no-deps --force-reinstall git+https://github.com/openai/whisper.git
if ! grep '^conda activate whisper' ~/.bashrc ; then
echo conda activate whisper >> ~/.bashrc
fi
+
+if ! grep '^export HIP_VISIBLE_DEVICES=0' ~/.bashrc ; then
+ echo 'export HIP_VISIBLE_DEVICES=0' >> ~/.bashrc
+fi