AIencoder commited on
Commit
6871109
·
verified ·
1 Parent(s): 5c32b5d

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +16 -11
entrypoint.sh CHANGED
@@ -1,19 +1,24 @@
1
  #!/bin/bash
2
- set -e
3
 
4
- echo "Starting Ollama..."
 
5
  ollama serve &
6
 
7
- # Wait for Ollama to wake up
8
- sleep 10
 
 
 
 
9
 
10
- echo "Pulling standard models..."
11
- ollama pull qwen2.5-coder:1.5b
12
- ollama pull qwen2.5-coder:3b
13
- ollama pull qwen2.5-coder:7b
14
 
15
- # NOTE: The 30B model download is now handled safely inside app.py
16
- # We removed the manual 'huggingface_hub' download block to prevent startup crashes.
 
17
 
18
- echo "Starting app..."
 
19
  python3 /app.py
 
1
  #!/bin/bash
 
2
 
3
+ # 1. Start Ollama in the background
4
+ echo "Starting Ollama server..."
5
  ollama serve &
6
 
7
+ # 2. Wait for Ollama to wake up (Checking every second)
8
+ echo "Waiting for Ollama to be ready..."
9
+ while ! curl -s http://localhost:11434/api/tags > /dev/null; do
10
+ sleep 1
11
+ done
12
+ echo "✅ Ollama is ready!"
13
 
14
+ # 3. Download the specific 30B model
15
+ echo "📥 Downloading Qwen 30B... (This will take a while, check logs)"
16
+ ollama pull hf.co/bartowski/Qwen_Qwen3-30B-A3B-GGUF:Q4_K_M
 
17
 
18
+ # 4. Download the smaller fast models (optional, but good to have)
19
+ echo "📥 Downloading smaller models..."
20
+ ollama pull qwen2.5-coder:3b
21
 
22
+ # 5. Finally, start the Python App
23
+ echo "🚀 Starting App..."
24
  python3 /app.py