fix: 统一服务端口为 8000,固定 streamlit 版本并同步依赖锁定

- 将 Dockerfile/HealthCheck/CMD 中的服务端口从 8001 统一改为 8000
  - 同步更新 README.md 中的 docker run 端口映射
  - pyproject.toml 中 streamlit 版本从 >=1.52.1 固定为 ==1.52.1
  - 同步 uv.lock:streamlit 降级锁定至 1.52.1,同步更新 pandas、protobuf、cachetools 等依赖版本
This commit is contained in:
zhenghu
2026-04-13 17:11:11 +08:00
parent 942db700be
commit efa844d32f
4 changed files with 48 additions and 41 deletions

View File

@@ -26,10 +26,10 @@ RUN uv sync --frozen --no-dev
COPY . .
# 暴露端口
EXPOSE 8001
EXPOSE 8000
# 设置环境变量
ENV STREAMLIT_SERVER_PORT=8001 \
ENV STREAMLIT_SERVER_PORT=8000 \
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false \
STREAMLIT_SERVER_ENABLE_CORS=false \
@@ -38,7 +38,7 @@ ENV STREAMLIT_SERVER_PORT=8001 \
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8001/_stcore/health || exit 1
CMD curl -f http://localhost:8000/_stcore/health || exit 1
# 运行 Streamlit 应用
CMD ["uv", "run", "streamlit", "run", "app.py", "--server.port=8001", "--server.address=0.0.0.0"]
CMD ["uv", "run", "streamlit", "run", "app.py", "--server.port=8000", "--server.address=0.0.0.0"]