From 26c3a8b80faeaf85372f7f6bef3599825034f591 Mon Sep 17 00:00:00 2001 From: xiamuceer Date: Wed, 18 Mar 2026 11:09:24 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0docker=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 00990f7..79ad2e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,16 +60,7 @@ RUN apt-get update && apt-get install -y \ # 复制后端依赖文件 COPY backend/requirements.txt ./ -# 根据架构安装PyTorch CPU版本 -# arm64架构使用pip直接安装,amd64使用PyTorch官方CPU源 -RUN if [ "$TARGETARCH" = "arm64" ]; then \ - pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu || \ - pip install --no-cache-dir torch; \ - else \ - pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; \ - fi - -# 安装其他Python依赖 +# 安装 Python 依赖(包含 torch,避免单独安装造成重复层) RUN if [ "$USE_CN_MIRROR" = "true" ]; then \ pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/; \ else \