Files
ailine/docker/frontend/Dockerfile
root 726236eaff
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 5m26s
重构代码,实现相对导入
2026-04-21 10:26:37 +08:00

22 lines
517 B
Docker

FROM python:3.11-slim
WORKDIR /app
ENV PYTHONPATH=/app
# 设置 pip 国内镜像源
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 复制前端依赖并安装
COPY frontend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制前端代码
COPY frontend/src/ ./frontend/
# 暴露端口
EXPOSE 8501
# 启动命令
CMD ["streamlit", "run", "frontend/frontend_main.py", "--server.port", "8501", "--server.address", "0.0.0.0", "--server.baseUrlPath", "/ai"]