From 11c915885111622fe3c599bb28ab49f5e568c95a Mon Sep 17 00:00:00 2001 From: puke <1129090915@qq.com> Date: Wed, 19 Nov 2025 00:57:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96docker=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +--- docker-compose.yml | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b2c27fa..b7ec2f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,7 @@ FROM python:3.11-slim # Build arguments for mirror configuration # USE_CN_MIRROR: whether to use China mirrors (true/false) -# UV_INDEX_URL: Python package index URL (defaults to Tsinghua when USE_CN_MIRROR=true) ARG USE_CN_MIRROR=false -ARG UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple # Set working directory WORKDIR /app @@ -53,7 +51,7 @@ COPY pixelle_video ./pixelle_video # Only create config when USE_CN_MIRROR=true, otherwise use default PyPI RUN if [ "$USE_CN_MIRROR" = "true" ]; then \ echo '[[index]]' > uv.toml && \ - echo "url = \"$UV_INDEX_URL\"" >> uv.toml && \ + echo 'url = "https://pypi.tuna.tsinghua.edu.cn/simple"' >> uv.toml && \ echo 'default = true' >> uv.toml; \ fi && \ export UV_HTTP_TIMEOUT=300 && \ diff --git a/docker-compose.yml b/docker-compose.yml index b871c5f..cb192b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,14 +3,11 @@ version: '3.8' # Build Arguments Configuration # You can override these by setting environment variables before running docker-compose # -# Example for China environment (auto uses Tsinghua/Aliyun mirrors): +# Example for China environment (auto uses Tsinghua mirror): # USE_CN_MIRROR=true docker-compose up -d # # Example for international environment (default): # docker-compose up -d -# -# Advanced: Use custom PyPI mirror: -# UV_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simple/ docker-compose up -d services: # API Service - FastAPI backend @@ -20,7 +17,6 @@ services: dockerfile: Dockerfile args: USE_CN_MIRROR: ${USE_CN_MIRROR:-false} - UV_INDEX_URL: ${UV_INDEX_URL:-https://pypi.tuna.tsinghua.edu.cn/simple} container_name: pixelle-video-api command: uv run python api/app.py --host 0.0.0.0 --port 8000 ports: @@ -59,7 +55,6 @@ services: dockerfile: Dockerfile args: USE_CN_MIRROR: ${USE_CN_MIRROR:-false} - UV_INDEX_URL: ${UV_INDEX_URL:-https://pypi.tuna.tsinghua.edu.cn/simple} container_name: pixelle-video-web command: uv run streamlit run web/app.py --server.port 8501 --server.address 0.0.0.0 ports: