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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -38,14 +38,9 @@ RUN curl -L https://huggingface.co/shenzhi-wang/Llama3.1-8B-Chinese-Chat/resolve
38
  # 将当前目录下的所有文件复制到容器内的/app目录
39
  COPY . /app
40
 
41
- # 启动Ollama服务并放到后台运行
42
- RUN nohup ollama serve > /dev/null 2>&1 &
 
43
 
44
- # 等待Ollama服务启动
45
- RUN sleep 10
46
-
47
- # 创建Ollama模型
48
- RUN ollama create llama3-zh -f /app/Modelfile
49
-
50
- # 启动Ollama服务和Gradio应用
51
- CMD ollama serve & python app.py
 
38
  # 将当前目录下的所有文件复制到容器内的/app目录
39
  COPY . /app
40
 
41
+ # 添加启动脚本并设置执行权限
42
+ COPY start.sh /app/start.sh
43
+ RUN chmod +x /app/start.sh
44
 
45
+ # 使用启动脚本
46
+ CMD ["/app/start.sh"]