Skip to content

Commit 015070b

Browse files
fix: update/pin dependencies to get ONNX runtime working again (#107)
#### Motivation Internal regression tests are failing when using the ONNX Runtime with an error indicating a dependency issue with ONNX Runtime and cuDNN: ``` Shard 0: 2024-07-31 19:38:04.423164988 [E:onnxruntime:Default, provider_bridge_ort.cc:1745 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1426 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn.so.9: cannot open shared object file: No such file or directory ``` I found that ORT 1.18.1 started to build against cudnn 9 (included in the [release notes](https://github.com/Microsoft/onnxruntime/releases/tag/v1.18.1)). However, PyTorch does not use cudnn 9 until 2.4.0, so I pinned in to 1.18.0. In updating poetry.lock, I let other deps update as well, but found other compatibility issue and had to pin transformers and optimum as well to get internal tests passing. #### Modifications - pin the onnxruntime version to 1.18.0 - pin transformers to 4.40.2 (and remove separate `pip install` for it) - pin optimum to 1.20 - run `poetry update` to update poetry.lock #### Result `DEPLOYMENT_FRAMEWORK=hf_optimum_ort` will start working again and internal tests will be passing. --------- Signed-off-by: Travis Johnson <[email protected]>
1 parent 572e03f commit 015070b

File tree

3 files changed

+655
-695
lines changed

3 files changed

+655
-695
lines changed

Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ RUN cd server && \
164164
make gen-server && \
165165
pip install ".[accelerate]" --no-cache-dir
166166

167-
# temp: install newer transformers lib that optimum clashes with
168-
RUN pip install transformers==4.40.0 tokenizers==0.19.1 --no-cache-dir
169-
170167
# Patch codegen model changes into transformers
171168
RUN cp server/transformers_patch/modeling_codegen.py ${SITE_PACKAGES}/transformers/models/codegen/modeling_codegen.py
172169

@@ -290,9 +287,6 @@ COPY server server
290287
# Ref: https://onnxruntime.ai/docs/install/#install-onnx-runtime-gpu-cuda-12x
291288
RUN cd server && make gen-server && pip install ".[accelerate, ibm-fms, onnx-gpu, quantize]" --no-cache-dir --extra-index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
292289

293-
# temp: install newer transformers lib that optimum clashes with
294-
RUN pip install transformers==4.40.0 tokenizers==0.19.1 --no-cache-dir
295-
296290
# Patch codegen model changes into transformers 4.35
297291
RUN cp server/transformers_patch/modeling_codegen.py ${SITE_PACKAGES}/transformers/models/codegen/modeling_codegen.py
298292

0 commit comments

Comments
 (0)