huduo commited on
Commit
7326cc0
·
verified ·
1 Parent(s): dd8a3aa

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -1
Dockerfile CHANGED
@@ -1,8 +1,19 @@
 
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
- # 安装 Python 依赖
 
 
 
 
 
 
 
 
 
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
 
1
+ # 使用 Python 3.9 slim 镜像
2
  FROM python:3.9-slim
3
 
4
+ # 设置工作目录
5
  WORKDIR /app
6
 
7
+ # 安装必要的系统依赖和 Ollama
8
+ RUN apt-get update && \
9
+ apt-get install -y curl && \
10
+ # 这里假设你可以使用 curl 来下载 Ollama 安装包
11
+ curl -sSL https://ollama.com/download/ollama-linux.tar.gz -o ollama.tar.gz && \
12
+ tar -xvf ollama.tar.gz && \
13
+ mv ollama /usr/local/bin/ && \
14
+ rm -f ollama.tar.gz
15
+
16
+ # 拷贝 Python 依赖并安装
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19