BIBLETUM aiivar commited on
Commit
eddb98e
·
verified ·
1 Parent(s): b0b1de1

env requirements installation (#2)

Browse files

- env requirements installation (950317c856d4507d38648159495997998dc01203)


Co-authored-by: Aivar Minsafin <aiivar@users.noreply.huggingface.co>

Files changed (1) hide show
  1. start.sh +21 -2
start.sh CHANGED
@@ -1,9 +1,28 @@
1
  #!/usr/bin/env bash
2
  set -euo pipefail
3
 
4
- MODEL_NAME="${MODEL_NAME:-qwen2.5:7b-instruct-q4_K_M}"
5
  OLLAMA_URL="${OLLAMA_URL:-http://127.0.0.1:11434}"
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  # Start Ollama server in background
8
  ollama serve > /tmp/ollama.log 2>&1 &
9
  OLLAMA_PID=$!
@@ -26,4 +45,4 @@ PY
26
  ollama pull "${MODEL_NAME}"
27
 
28
  # Start Gradio app
29
- exec python3 /app/app.py
 
1
  #!/usr/bin/env bash
2
  set -euo pipefail
3
 
4
+ MODEL_NAME="${MODEL_NAME:-danielsheep/Qwen3-Coder-30B-A3B-Instruct-1M-Unsloth:UD-IQ3_XXS}"
5
  OLLAMA_URL="${OLLAMA_URL:-http://127.0.0.1:11434}"
6
 
7
+ # Get the directory where the script is located
8
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
+ cd "$SCRIPT_DIR"
10
+
11
+ # Create virtual environment if it doesn't exist
12
+ if [ ! -d "venv" ]; then
13
+ echo "Creating virtual environment..."
14
+ python3 -m venv venv
15
+ fi
16
+
17
+ # Activate virtual environment
18
+ echo "Activating virtual environment..."
19
+ source venv/bin/activate
20
+
21
+ # Install requirements
22
+ echo "Installing requirements..."
23
+ pip install --upgrade pip
24
+ pip install -r requirements.txt
25
+
26
  # Start Ollama server in background
27
  ollama serve > /tmp/ollama.log 2>&1 &
28
  OLLAMA_PID=$!
 
45
  ollama pull "${MODEL_NAME}"
46
 
47
  # Start Gradio app
48
+ exec python3 app.py