jljiu commited on
Commit
cc0280c
·
verified ·
1 Parent(s): 3b7ade9

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +15 -0
start.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # 启动 Ollama 服务
4
+ ollama serve &
5
+
6
+ # 等待 Ollama 服务完全启动
7
+ sleep 10
8
+
9
+ # 检查模型是否存在,如果不存在则创建
10
+ if ! ollama list | grep -q "llama3-zh"; then
11
+ ollama create llama3-zh -f /app/Modelfile
12
+ fi
13
+
14
+ # 启动 Python 应用
15
+ python app.py