From ced6104035ac43c996bd3fd3a506bc773c43472f Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 23 Mar 2024 14:51:41 -0400 Subject: Source bashrc at the correct spot. Use rocm_version and set HIP visible to zero --- ai/whisper.sh | 13 ++++++++----- 1 file 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 -- cgit v1.2.3