-
-
Notifications
You must be signed in to change notification settings - Fork 142
/
install_playground.sh
executable file
·52 lines (48 loc) · 1.42 KB
/
install_playground.sh
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
# install frontend
cd interface
yarn install
# install and run backend
cd ..
conda --version
# Create a conda environment (to install Diart requirements) with Python 3.8 and activate it
echo "Current shell: $SHELL"
# Detect the shell name from the SHELL environment variable
shell_name="$(basename "$SHELL")"
env_name="whisper-playground"
# Run the appropriate conda init command based on the detected shell
case "$shell_name" in
"bash")
echo "bash shell detected"
conda init bash
;;
"zsh")
echo "zsh shell detected"
conda init zsh
;;
"fish")
echo "fish shell detected"
conda init fish
;;
*) # Handle other or unknown shells
echo "Unsupported shell: $shell_name"
echo "Please initialize Conda manually for your shell."
exit 1
;;
esac
# Now, your shell should be properly configured to use 'conda activate'
echo "Your shell has been configured to use 'conda activate'."
conda create -n $env_name python=3.8
# Fix for conda activate not working
if [ -f ~/miniconda3/etc/profile.d/conda.sh ]; then
source ~/miniconda3/etc/profile.d/conda.sh
elif [ -f ~/anaconda3/etc/profile.d/conda.sh ]; then
source ~/anaconda3/etc/profile.d/conda.sh
fi
conda activate $env_name
echo "Conda environment $env_name activated"
# Install ffmpeg
conda install ffmpeg portaudio -c conda-forge
echo "Installed ffmpeg and portaudio"
# Install packages from 'requirements.txt'
pip install -r requirements.txt
echo "requirements.txt file installed"