AIencoder commited on
Commit
0d5747e
·
verified ·
1 Parent(s): dcc36cf

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +3 -33
entrypoint.sh CHANGED
@@ -4,6 +4,7 @@ set -e
4
  echo "Starting Ollama..."
5
  ollama serve &
6
 
 
7
  sleep 10
8
 
9
  echo "Pulling standard models..."
@@ -11,39 +12,8 @@ ollama pull qwen2.5-coder:1.5b
11
  ollama pull qwen2.5-coder:3b
12
  ollama pull qwen2.5-coder:7b
13
 
14
- echo "Downloading Qwen3-Coder-30B-A3B GGUF..."
15
- mkdir -p /tmp/models
16
-
17
- # Use huggingface-cli instead (more reliable)
18
- pip3 install -q huggingface_hub --break-system-packages
19
- python3 -c "
20
- from huggingface_hub import hf_hub_download
21
- path = hf_hub_download(
22
- repo_id='Qwen/Qwen3-Coder-30B-A3B-Instruct-GGUF',
23
- filename='qwen3-coder-30b-a3b-instruct-q4_k_m.gguf',
24
- local_dir='/tmp/models'
25
- )
26
- print(f'Downloaded to: {path}')
27
- "
28
-
29
- echo "Creating Ollama model from GGUF..."
30
- cat > /tmp/Modelfile << 'EOF'
31
- FROM /tmp/models/qwen3-coder-30b-a3b-instruct-q4_k_m.gguf
32
- TEMPLATE """{{- if .System }}<|im_start|>system
33
- {{ .System }}<|im_end|>
34
- {{ end }}<|im_start|>user
35
- {{ .Prompt }}<|im_end|>
36
- <|im_start|>assistant
37
- """
38
- PARAMETER stop "<|im_end|>"
39
- PARAMETER temperature 0.7
40
- PARAMETER num_ctx 4096
41
- EOF
42
-
43
- ollama create qwen3-coder-30b-a3b -f /tmp/Modelfile
44
-
45
- echo "Models ready!"
46
- ollama list
47
 
48
  echo "Starting app..."
49
  python3 /app.py
 
4
  echo "Starting Ollama..."
5
  ollama serve &
6
 
7
+ # Wait for Ollama to wake up
8
  sleep 10
9
 
10
  echo "Pulling standard models..."
 
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