Create start.sh
Browse files
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
|