Skip to content

Commit

Permalink
Update onnx python package and setuptools (#17709)
Browse files Browse the repository at this point in the history
### Description
A follow-up for #17125
  • Loading branch information
snnn authored Sep 27, 2023
1 parent e6aa0fa commit 276e873
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,14 @@
"^test_squeeze_negative_axes"
],
"current_failing_tests_OPENVINO_CPU_FP32": [
"^test_affine_grid_2d_align_corners",
"^test_affine_grid_2d_align_corners_expanded",
"^test_affine_grid_2d",
"^test_affine_grid_2d_expanded",
"^test_affine_grid_3d_align_corners",
"^test_affine_grid_3d_align_corners_expanded",
"^test_affine_grid_3d",
"^test_affine_grid_3d_expanded",
"^test_operator_permute2",
"^test_operator_repeat",
"^test_operator_repeat_dim_overflow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ steps:
architecture: ${{parameters.BuildArch}}

- script: |
python -m pip install --upgrade "setuptools>=61.0.0" wheel numpy flatbuffers
python -m pip install --upgrade "setuptools>=68.2.2" wheel numpy flatbuffers
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Install python modules'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN dnf install -y \
ln -s /usr/bin/pip3 pip3.8;

RUN pip3 install --upgrade pip
RUN pip3 install setuptools>=41.0.0
RUN pip3 install setuptools>=68.2.2

# Install TensorRT
RUN dnf install -y libnvinfer8 libnvonnxparsers8 libnvparsers8 libnvinfer-plugin8 libnvinfer-lean8 libnvinfer-vc-plugin8 libnvinfer-dispatch8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN apt-get install -y --no-install-recommends \
ln -s /usr/bin/pip3 pip;

RUN pip install --upgrade pip
RUN pip install setuptools>=41.0.0
RUN pip install setuptools>=68.2.2

# Install TensorRT
RUN v="8.4.1-1+cuda11.6" &&\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get install -y --no-install-recommends \
ln -s /usr/bin/pip3 pip;

RUN pip install --upgrade pip
RUN pip install setuptools>=41.0.0
RUN pip install setuptools>=68.2.2

# Install TensorRT
RUN v="8.5.1-1+cuda11.8" &&\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get install -y --no-install-recommends \
ln -s /usr/bin/pip3 pip;

RUN pip install --upgrade pip
RUN pip install setuptools>=41.0.0
RUN pip install setuptools>=68.2.2

# Install TensorRT
RUN v="8.6.1.6-1+cuda11.8" &&\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN apt-get install -y --no-install-recommends \
ln -s /usr/bin/pip3 pip;

RUN pip install --upgrade pip
RUN pip install setuptools>=41.0.0
RUN pip install setuptools>=68.2.2

# Install TensorRT from tar.gz
RUN tar -xzvf /TensorRT-${TAR_TRT_VERSION}.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ numpy==1.21.6 ; python_version < '3.11'
numpy==1.24.2 ; python_version >= '3.11'
mypy
pytest
setuptools>=41.4.0
setuptools>=68.2.2
wheel
git+http://github.com/onnx/onnx.git@e2525550194ce3d8a2c4a3af451c9d9b3ae6650e#egg=onnx
git+http://github.com/onnx/onnx.git@fdefbe85ed9c362b95b9b401cd19db068a76141f#egg=onnx
protobuf==3.20.2
sympy==1.12
flatbuffers
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ numpy==1.21.6 ; python_version < '3.11'
numpy==1.24.2 ; python_version >= '3.11'
mypy
pytest
setuptools>=41.4.0
setuptools>=68.2.2
wheel
git+http://github.com/onnx/onnx.git@ac3e58759463ff3a3089e3cd64fddbfad0f6724d#egg=onnx
git+http://github.com/onnx/onnx.git@fdefbe85ed9c362b95b9b401cd19db068a76141f#egg=onnx
protobuf==3.20.2
sympy==1.12
flatbuffers
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/linux/docker/scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ numpy==1.21.6 ; python_version < '3.11'
numpy==1.24.2 ; python_version >= '3.11'
mypy
pytest
setuptools>=41.4.0
setuptools>=68.2.2
wheel>=0.35.1
git+http://github.com/onnx/onnx.git@e2525550194ce3d8a2c4a3af451c9d9b3ae6650e#egg=onnx
git+http://github.com/onnx/onnx.git@fdefbe85ed9c362b95b9b401cd19db068a76141f#egg=onnx
argparse
sympy==1.12
flatbuffers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ torchvision==0.15.1+cu118
torchtext==0.15.1
# TODO(bmeswani): packaging 22.0 removes support for LegacyVersion leading to errors because transformers 4.4.2 uses LegacyVersion
packaging==21.3
setuptools>=41.4.0
setuptools>=68.2.2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/torch_stable.html
torch==2.0.0+cpu
setuptools>=41.4.0
setuptools>=68.2.2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--pre
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.13.1+cpu
setuptools>=41.4.0
setuptools>=68.2.2
cerberus
h5py
scikit-learn
Expand Down
17 changes: 10 additions & 7 deletions tools/ci_build/github/windows/helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function Install-Abseil {
.Description
The Install-UTF8-Range function installs Google's utf8_range library from source.
utf8_range depends on Abseil.
.PARAMETER cmake_path
The full path of cmake.exe
Expand Down Expand Up @@ -604,14 +604,17 @@ function Install-ONNX {
pushd .

Write-Host "Uninstalling onnx and ignore errors if there is any..."
python.exe -m pip uninstall -y onnx -qq
[string[]]$pip_args ="-m", "pip", "uninstall", "-y", "onnx", "-qq"
&"python.exe" $pip_args
if ($lastExitCode -ne 0) {
exit $lastExitCode
}

Write-Host "Installing python packages..."
$p = Start-Process -NoNewWindow -Wait -PassThru -FilePath "python.exe" -ArgumentList "-m", "pip", "install", "--disable-pip-version-check", "setuptools", "wheel", "numpy", "protobuf==$protobuf_version"
$exitCode = $p.ExitCode
if ($exitCode -ne 0) {
Write-Host -Object "Install dependent python wheels failed. Exitcode: $exitCode"
exit $exitCode
[string[]]$pip_args = "-m", "pip", "install", "-qq", "--disable-pip-version-check", "setuptools>=68.2.2", "wheel", "numpy", "protobuf==$protobuf_version"
&"python.exe" $pip_args
if ($lastExitCode -ne 0) {
exit $lastExitCode
}

$url=Get-DownloadURL -name onnx -src_root $src_root
Expand Down

0 comments on commit 276e873

Please sign in to comment.