From 9c57af9aff0d4625705f66dd51fdda1ff1df6d08 Mon Sep 17 00:00:00 2001 From: puke <1129090915@qq.com> Date: Fri, 14 Nov 2025 01:03:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Dockerfile=E4=B8=AD=E7=9A=84u?= =?UTF-8?q?v=E9=95=9C=E5=83=8F=E8=AE=BE=E7=BD=AE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 86d886c..d5a8043 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,12 +51,17 @@ COPY pixelle_video ./pixelle_video # Install Python dependencies using uv with configurable index URL # Auto-select China mirror when USE_CN_MIRROR=true and UV_INDEX_URL is default # Set longer timeout and reduce concurrent downloads for stability +# IMPORTANT: UV requires BOTH environment variable AND --index-url for proper mirror usage RUN if [ "$USE_CN_MIRROR" = "true" ] && [ "$UV_INDEX_URL" = "https://pypi.org/simple" ]; then \ export UV_HTTP_TIMEOUT=300 && \ - uv sync --frozen --no-dev --index-url https://mirrors.aliyun.com/pypi/simple/; \ + export UV_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ && \ + export UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/ && \ + uv sync --frozen --no-dev; \ else \ export UV_HTTP_TIMEOUT=300 && \ - uv sync --frozen --no-dev --index-url $UV_INDEX_URL; \ + export UV_INDEX_URL=$UV_INDEX_URL && \ + export UV_DEFAULT_INDEX=$UV_INDEX_URL && \ + uv sync --frozen --no-dev; \ fi # Copy rest of application code