forked from Pamir-AI/distiller-cm5-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
33 lines (31 loc) · 1.02 KB
/
Copy pathinstall.sh
File metadata and controls
33 lines (31 loc) · 1.02 KB
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
#!/bin/bash
WORKING_DIR=$(pwd)
# Check if the .venv directory exists
if [ ! -d ".venv" ]; then
echo "Virtual environment not found. Installing dependencies..."
# Install dependencies using uv
uv pip install -r requirements.txt
if [ $? -ne 0 ]; then
echo "Failed to install dependencies."
exit 1
fi
echo "Dependencies installed successfully."
else
echo "Virtual environment already exists."
fi
# Check if the LLM model file exists
MODEL_PATH="${WORKING_DIR}/llm_server/models/qwen2.5-3b-instruct-q4_k_m.gguf"
if [ ! -f "$MODEL_PATH" ]; then
echo "Model file not found at $MODEL_PATH. Downloading..."
# Create the directory if it doesn't exist
mkdir -p "$(dirname "$MODEL_PATH")"
# Download the model file
wget -O "$MODEL_PATH" https://huggingface.co/Qwen/Qwen2.5-3B-Instruct-GGUF/resolve/main/qwen2.5-3b-instruct-q4_k_m.gguf
if [ $? -ne 0 ]; then
echo "Failed to download the model file."
exit 1
fi
echo "Model file downloaded successfully."
else
echo "Model file already exists at $MODEL_PATH."
fi