-
-
Notifications
You must be signed in to change notification settings - Fork 296
/
install_mac.command
executable file
·56 lines (48 loc) · 1.58 KB
/
install_mac.command
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
#!/bin/bash
# First, change to the script's directory
cd "$(dirname "$0")"
echo "Creating Virtual Environment..."
pip install uv
uv venv --python 3.12.8
source .venv/bin/activate
echo "Installing Dependencies..."
if [ -f "requirements.txt" ]; then
uv pip install -r requirements.txt
else
echo "Error: requirements.txt not found in $(pwd)"
exit 1
fi
echo "Downloading Models..."
# Use simple arrays instead of associative arrays for better compatibility
urls=(
"https://github.com/dnhkng/GlaDOS/releases/download/0.1/glados.onnx"
"https://github.com/dnhkng/GlaDOS/releases/download/0.1/nemo-parakeet_tdt_ctc_110m.onnx"
"https://github.com/dnhkng/GlaDOS/releases/download/0.1/phomenizer_en.onnx"
"https://github.com/dnhkng/GlaDOS/releases/download/0.1/silero_vad.onnx"
)
files=(
"models/glados.onnx"
"models/nemo-parakeet_tdt_ctc_110m.onnx"
"models/phomenizer_en.onnx"
"models/silero_vad.onnx"
)
# Loop through arrays by index
for i in "${!urls[@]}"; do
echo "Checking file: ${files[$i]}"
if [ -f "${files[$i]}" ]; then
echo "File ${files[$i]} already exists."
else
echo "File ${files[$i]} does not exist. Downloading..."
mkdir -p "$(dirname "${files[$i]}")" # Create the directory if it doesn't exist
curl -L "${urls[$i]}" --output "${files[$i]}"
if [ -f "${files[$i]}" ]; then
echo "Download successful."
else
echo "Download failed."
fi
fi
done
echo "Installation Complete!"
# Keep the terminal window open to see any errors
echo "Press any key to close..."
read -n 1