容器处理

This commit is contained in:
2026-04-21 16:27:05 +08:00
parent 8b354b7ccc
commit 08826c70a3
13 changed files with 80 additions and 220 deletions

View File

@@ -5,7 +5,7 @@ WORKDIR /app
# =============================================================================
# 非敏感环境变量(固化在镜像中,无需通过 .env 配置)
# =============================================================================
ENV PYTHONPATH=/app
ENV PYTHONPATH=/app:/app/backend
# llama.cpp 服务配置(本地部署标准端口)
ENV VLLM_BASE_URL=http://host.docker.internal:18000/v1

View File

@@ -12,10 +12,10 @@ COPY frontend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制前端代码
COPY frontend/src/ ./frontend/
COPY frontend/src/ ./src/
# 暴露端口
EXPOSE 8501
# 启动命令
CMD ["streamlit", "run", "frontend/frontend_main.py", "--server.port", "8501", "--server.address", "0.0.0.0", "--server.baseUrlPath", "/ai"]
CMD ["streamlit", "run", "src/frontend_main.py", "--server.port", "8501", "--server.address", "0.0.0.0", "--server.baseUrlPath", "/ai"]