ollama-api / Dockerfile
huduo's picture
Update Dockerfile
d2e5e38 verified
raw
history blame contribute delete
500 Bytes
# 使用 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"]