Add PIP_INDEX_URL fallback for uv install in worker stage

curl to astral.sh is unreachable from Iran. Added pip install fallback
from the local registry mirror. Also set PIP_INDEX_URL env var so pip
respects the mirror by default in subsequent RUN layers.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-08-04 23:24:35 +03:30
parent 40ff56490d
commit dd49d8c974
+6 -1
View File
@@ -67,10 +67,15 @@ RUN printf 'Types: deb\nURIs: http://ubuntu.parsvds.com/ubuntu/\nSuites: noble n
python3 python3-venv \
&& rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
&& . /usr/local/env 2>/dev/null || true
&& . /usr/local/env 2>/dev/null || true \
|| pip install --break-system-packages \
--index-url https://pypi.reg.darano.ir/simple/ \
--trusted-host pypi.reg.darano.ir \
uv
ENV PATH="/usr/local/bin:$PATH" \
UV_DEFAULT_INDEX="https://pypi.reg.darano.ir" \
PIP_INDEX_URL="https://pypi.reg.darano.ir/simple/" \
# Chromium is pre-installed at /usr/bin/chromium
CHROME_BINARY=/usr/bin/chromium \
CHROMEDRIVER_PATH=/usr/bin/chromedriver \