Files
openai_pool_orchestrator-main/Dockerfile

36 lines
997 B
Docker
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ========================================
# OpenAI Pool Orchestrator Docker 镜像
# ========================================
FROM python:3.12-slim
# 禁用缓冲,让 Python 日志立即输出到 docker logs 终端
ENV PYTHONUNBUFFERED=1
# 系统依赖curl-cffi 编译需要)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc g++ make curl libssl-dev libffi-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 先拷贝依赖清单
COPY requirements.txt pyproject.toml ./
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -e .
# 拷贝项目全部代码
COPY . .
# 再次以可编辑模式安装,确保 static 资源被正确注册
RUN pip install --no-cache-dir -e .
# 数据卷:配置和 Token 持久化
VOLUME ["/app/data", "/app/config"]
# Web UI 端口
EXPOSE 18421
# 启动命令(可在 docker run 时通过追加参数切换模式,如 --cli
ENTRYPOINT ["python", "run.py"]