Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4e483af2c | |||
| abca6b05cb |
@@ -93,26 +93,45 @@ 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.
|
||||
curl -fsSLo /tmp/pip.pyz https://bootstrap.pypa.io/pip/pip.pyz
|
||||
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
|
||||
python_tmp="$(mktemp -d)"
|
||||
trap 'rm -rf -- "$python_tmp"' EXIT
|
||||
curl -fsSLo "$python_tmp/pip.pyz" https://bootstrap.pypa.io/pip/pip.pyz
|
||||
install_locked() {
|
||||
local interpreter="$1" destination="$2" attempt scratch
|
||||
shift 2
|
||||
for attempt in 1 2 3; do
|
||||
scratch="$(mktemp -d "$python_tmp/install.XXXXXX")"
|
||||
if PIP_CACHE_DIR="$scratch/cache" "$interpreter" "$python_tmp/pip.pyz" install \
|
||||
--target "$scratch/site" --require-hashes "$@"; then
|
||||
mv "$scratch/site" "$destination"
|
||||
return
|
||||
fi
|
||||
echo "Locked Python dependency install attempt $attempt failed."
|
||||
done
|
||||
return 1
|
||||
}
|
||||
parser_install_succeeded=false
|
||||
for attempt in 1 2 3; do
|
||||
if install_parser_dependencies; then
|
||||
parser_install_succeeded=true
|
||||
break
|
||||
fi
|
||||
echo "Parser dependency install attempt $attempt failed — retrying with a fresh isolated cache..."
|
||||
done
|
||||
test "$parser_install_succeeded" = true
|
||||
PIP_CACHE_DIR="$parser_pip_cache" python3 /tmp/pip.pyz install --upgrade --target .python-ci pytest==8.3.5 httpx2==2.12.0
|
||||
python3 --version
|
||||
PYTHONFAULTHANDLER=1 PYTHONPATH="$PWD/.python-ci" AI_SERVICE_SKIP_MODEL_LOAD=1 python3 -m pytest -q
|
||||
install_locked python3 "$python_tmp/sidecar" --extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
-r requirements-dev-linux.lock
|
||||
PYTHONFAULTHANDLER=1 PYTHONPATH="$python_tmp/sidecar" AI_SERVICE_SKIP_MODEL_LOAD=1 \
|
||||
python3 -m pytest -q --ignore=tests/test_document_extractor.py
|
||||
|
||||
# The CV parser uses a separate dependency set. Its lock already pins
|
||||
# pluggy and pygments; add the remaining hashed pytest requirements.
|
||||
# The Docling lock targets Python 3.12, while the Debian runner uses 3.11.
|
||||
cv_archive="$python_tmp/cv-python.tar.gz"
|
||||
curl -fsSL --retry 2 -o "$cv_archive" \
|
||||
'https://github.com/astral-sh/python-build-standalone/releases/download/20250517/cpython-3.12.10%2B20250517-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz'
|
||||
echo "0356bd1db292781a20e011d789f0c41ea5ec04731c8236c8185b53a54faf2871 $cv_archive" | sha256sum -c -
|
||||
tar -xzf "$cv_archive" -C "$python_tmp"
|
||||
cv_python="$python_tmp/python/bin/python3"
|
||||
"$cv_python" --version
|
||||
awk '/^[^[:space:]#]/ { include = /^(iniconfig|packaging|pytest)==/ }
|
||||
include && !/^[[:space:]]*#/ { print }' requirements-dev-linux.lock > "$python_tmp/cv-test-tools.lock"
|
||||
test "$(grep -Ec '^(iniconfig|packaging|pytest)==' "$python_tmp/cv-test-tools.lock")" -eq 3
|
||||
install_locked "$cv_python" "$python_tmp/cv-parser" -r requirements-cv-import.lock -r "$python_tmp/cv-test-tools.lock"
|
||||
PYTHONFAULTHANDLER=1 PYTHONPATH="$python_tmp/cv-parser" OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 \
|
||||
"$cv_python" -m pytest -q tests/test_document_extractor.py
|
||||
|
||||
- name: Restore backend
|
||||
# The runner/proxy has occasionally supplied checksum-invalid NuGet cache entries (NU3008).
|
||||
|
||||
Generated
+14
-14
@@ -30,7 +30,7 @@
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"react-grid-layout": "2.3.0",
|
||||
"react-router-dom": "^7.18.2",
|
||||
"react-router-dom": "^7.18.5",
|
||||
"typescript": "^5.9.3",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
@@ -6285,9 +6285,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.1.2.tgz",
|
||||
"integrity": "sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -11055,9 +11055,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.2.tgz",
|
||||
"integrity": "sha512-aUVMjFm3GAPTTZL7oYr5E7ETiqfQCHRLH+B+5afnICvf0r7kkK4eR6SMuwbSTJw/7t+12khT/Kahij49fqOCIg==",
|
||||
"version": "7.18.5",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.5.tgz",
|
||||
"integrity": "sha512-dTgvcXDOrLPrlLHrcZAqWveiK1hMSqN+rGAJzegP8HtmNkfRxOoshGWBNX3ZJ0cZjOHkRdlUJtaIhZMLLyGyPw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cookie": "^1.0.1",
|
||||
@@ -11077,12 +11077,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.2.tgz",
|
||||
"integrity": "sha512-AIKJ/jgGlFb3EbfCXk5Gzshiwt+l3mqbCrNjmEWMMjqQxNJ3svBa6bgzFyCC2Sw3RA0VWF1kg3uQf2OFhxb8hw==",
|
||||
"version": "7.18.5",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.5.tgz",
|
||||
"integrity": "sha512-9HcfDMU6JJ/fp6gJZYGwNE6RknVGS4kBjH1HkNw959mCJi70TVwdipQWv2FEol9uGpi+SZTFtVpJPtEQfayeOw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"react-router": "7.18.2"
|
||||
"react-router": "7.18.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
@@ -12749,9 +12749,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.21.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz",
|
||||
"integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",
|
||||
"version": "8.23.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.23.1.tgz",
|
||||
"integrity": "sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"react-grid-layout": "2.3.0",
|
||||
"react-router-dom": "^7.18.2",
|
||||
"react-router-dom": "^7.18.5",
|
||||
"typescript": "^5.9.3",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
|
||||
@@ -1075,9 +1075,9 @@ tqdm==4.70.0 \
|
||||
# via
|
||||
# huggingface-hub
|
||||
# transformers
|
||||
transformers==5.10.4 \
|
||||
--hash=sha256:8c5b99b141b53619435a76629b0284f04d27ff46d788b463fc0ecb23b8ff130e \
|
||||
--hash=sha256:de37741509e64ccb88f7f5708beaf5b1914df447f5fe659f9c0fd95950413168
|
||||
transformers==5.10.0 \
|
||||
--hash=sha256:206c54d6d992bc35fef90f1252ac3f2746cdf549928b76e7c8c4f182684cee60 \
|
||||
--hash=sha256:eae143e46d8e521da604bc4fdc45af7dd90e96eacbbc27f68d2754150aa5175a
|
||||
# via -r requirements.txt
|
||||
truststore==0.10.5 \
|
||||
--hash=sha256:30d36967ccaded5cbb38d602c433f53600036c79d502f4533a49b60a03bbefcd \
|
||||
|
||||
@@ -1049,9 +1049,9 @@ tqdm==4.70.0 \
|
||||
# via
|
||||
# huggingface-hub
|
||||
# transformers
|
||||
transformers==5.10.4 \
|
||||
--hash=sha256:8c5b99b141b53619435a76629b0284f04d27ff46d788b463fc0ecb23b8ff130e \
|
||||
--hash=sha256:de37741509e64ccb88f7f5708beaf5b1914df447f5fe659f9c0fd95950413168
|
||||
transformers==5.10.0 \
|
||||
--hash=sha256:206c54d6d992bc35fef90f1252ac3f2746cdf549928b76e7c8c4f182684cee60 \
|
||||
--hash=sha256:eae143e46d8e521da604bc4fdc45af7dd90e96eacbbc27f68d2754150aa5175a
|
||||
# via -r requirements.txt
|
||||
typer==0.27.3 \
|
||||
--hash=sha256:d0396f770a560ab1b0a8504e13b5f254b728cedb05c61cf0359e944e50ce8901 \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fastapi==0.141.1
|
||||
starlette==1.6.0
|
||||
uvicorn[standard]==0.34.0
|
||||
transformers==5.10.4
|
||||
transformers==5.10.0
|
||||
cachetools==5.5.2
|
||||
pydantic==2.10.6
|
||||
torch==2.13.0
|
||||
|
||||
Reference in New Issue
Block a user