fix(ci): retry corrupt parser downloads
This commit is contained in:
@@ -73,12 +73,18 @@ jobs:
|
||||
# The Debian runner omits pip and python3-venv. Use pip's official
|
||||
# zipapp and install into the checkout so CI remains isolated without
|
||||
# sudo or a mutable runner-global Python environment.
|
||||
rm -rf .python-ci
|
||||
curl -fsSLo /tmp/pip.pyz https://bootstrap.pypa.io/pip/pip.pyz
|
||||
python3 /tmp/pip.pyz install --target .python-ci --require-hashes \
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
-r requirements-linux.lock
|
||||
python3 /tmp/pip.pyz install --target .python-ci pytest==8.3.5 httpx2==2.12.0
|
||||
install_parser_dependencies() {
|
||||
rm -rf .python-ci
|
||||
parser_pip_cache="$(mktemp -d)"
|
||||
PIP_CACHE_DIR="$parser_pip_cache" python3 /tmp/pip.pyz install --target .python-ci --require-hashes \
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
-r requirements-linux.lock
|
||||
}
|
||||
install_parser_dependencies \
|
||||
|| ( echo "Parser dependency install failed ($?) — retrying with a fresh isolated cache..." \
|
||||
&& install_parser_dependencies )
|
||||
PIP_CACHE_DIR="$parser_pip_cache" python3 /tmp/pip.pyz install --upgrade --target .python-ci pytest==8.3.5 httpx2==2.12.0
|
||||
PYTHONPATH="$PWD/.python-ci" AI_SERVICE_SKIP_MODEL_LOAD=1 python3 -m pytest -q
|
||||
|
||||
- name: Restore backend
|
||||
|
||||
Reference in New Issue
Block a user