Files
ailine/docker/frontend/Dockerfile

22 lines
507 B
Docker
Raw Normal View History

2026-04-21 10:26:37 +08:00
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
# 复制前端代码
2026-04-21 16:27:05 +08:00
COPY frontend/src/ ./src/
2026-04-21 10:26:37 +08:00
# 暴露端口
EXPOSE 8501
# 启动命令
2026-04-21 16:27:05 +08:00
CMD ["streamlit", "run", "src/frontend_main.py", "--server.port", "8501", "--server.address", "0.0.0.0", "--server.baseUrlPath", "/ai"]