File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,15 +40,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4040 build-essential \
4141 curl \
4242 gcc \
43+ pkg-config \
44+ libssl-dev \
45+ libffi-dev \
46+ python3-dev \
47+ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
4348 && rm -rf /var/lib/apt/lists/*
4449
4550# 创建虚拟环境并安装 Python 依赖
4651WORKDIR /app
4752COPY backend/requirements.txt requirements.txt
4853RUN python3 -m venv ${VENV_PATH} \
49- && pip install --upgrade pip \
50- && pip install -r requirements.txt \
51- && rm -rf /root/.cache
54+ && /root/.cargo/bin/rustc --version \
55+ && PATH="/root/.cargo/bin:$PATH" pip install --upgrade pip \
56+ && PATH="/root/.cargo/bin:$PATH" pip install -r requirements.txt \
57+ && rm -rf /root/.cache /root/.cargo
5258
5359# 最终运行阶段
5460FROM prepare_package AS final
You can’t perform that action at this time.
0 commit comments