File size: 500 Bytes
7326cc0
807c6ce
 
7326cc0
807c6ce
 
7326cc0
 
 
d2e5e38
 
7326cc0
 
807c6ce
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 使用 Python 3.9 slim 镜像
FROM python:3.9-slim

# 设置工作目录
WORKDIR /app

# 安装必要的系统依赖和 Ollama
RUN apt-get update && \
    apt-get install -y curl && \
    # 使用 Ollama 提供的安装脚本进行安装
    curl -sSL https://ollama.ai/install.sh | sh

# 拷贝 Python 依赖并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 拷贝应用代码
COPY . .

# 暴露服务端口
EXPOSE 8080

# 启动脚本
CMD ["sh", "start.sh"]