This commit is contained in:
silk 2026-06-16 20:53:21 +08:00
parent 70c3365d83
commit a79ed6d503
1 changed files with 8 additions and 2 deletions

View File

@ -2,14 +2,20 @@ FROM python:3.12-slim
WORKDIR /app WORKDIR /app
# 国内服务器访问 Debian / PyPI 官方源易超时,改用阿里云镜像
RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources \
|| sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY pyproject.toml ./ COPY pyproject.toml ./
COPY excel_analyzer.py server.py ./ COPY excel_analyzer.py server.py ./
RUN pip install --no-cache-dir --upgrade pip \ ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
&& pip install --no-cache-dir --timeout 120 --retries 10 . ENV PIP_TRUSTED_HOST=mirrors.aliyun.com
RUN pip install --no-cache-dir --timeout 300 --retries 10 .
ENV MCP_HOST=0.0.0.0 ENV MCP_HOST=0.0.0.0
ENV MCP_PORT=8010 ENV MCP_PORT=8010