Skip to content

[2026.1] Building Dockerfile.redhat with RUN_TESTS=1 fails #4172

@RH-steve-grubb

Description

@RH-steve-grubb

When the 2026.1 Dockerfile.redhat is use to build an image with RUN_TESTS=1, it ends in a traceback:

Traceback (most recent call last):
File "/usr/local/bin/optimum-cli", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.12/site-packages/optimum/commands/
optimum_cli.py", line 219, in main
service.run()
File "/usr/local/lib/python3.12/site-packages/optimum/commands/export/
openvino.py", line 344, in run
from ...exporters.openvino.main import _main_quantize, _merge_move,
main_export
File "/usr/local/lib/python3.12/site-packages/optimum/exporters/openvino/
init.py", line 15, in
import optimum.exporters.openvino.model_configs
File "/usr/local/lib/python3.12/site-packages/optimum/exporters/openvino/
model_configs.py", line 22, in
from optimum.exporters.onnx.config import OnnxConfig, TextDecoderOnnxConfig,
TextDecoderWithPositionIdsOnnxConfig
File "/usr/local/lib/python3.12/site-packages/optimum/exporters/onnx/
config.py", line 25, in
from optimum.exporters.tasks import TasksManager
File "/usr/local/lib/python3.12/site-packages/optimum/exporters/tasks.py",
line 28, in
from requests.exceptions import ConnectionError
ModuleNotFoundError: No module named 'requests'

The failure comes when it is setting up to run the tests using
prepare_llm_models. prepare_llm_models at line 46, it checks if "docker" was
passed. It is, so it takes the branch where it does:

python3 -m pip install "optimum-intel"@git+https://github.com/huggingface/
optimum-intel.git nncf sentence_transformers einops timm==1.0.22
sentencepiece

When the requirements are installed from prepare_llm_models, it resolves to
huggingface_hub 1.12.0 which no longer requires requests.
We also get transformers 5.0.0 which also does not require requests. So, it
appears that without constraints on transformer/huggingface_hub, requests is
no longer pulled in by dependency and must be manually added.

So, what is the correct solution for the unit tests? Should it manually install requests or should transformers be constrained to a version less than 5.0.0? Note that this floating transformers requirement is another mismatch with demos/python-demos/requirements.txt

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions