Skip to content

Ubuntu 26.04 support - #342

Open
culhatsker wants to merge 7 commits into
openvinotoolkit:masterfrom
culhatsker:ubuntu26
Open

Ubuntu 26.04 support#342
culhatsker wants to merge 7 commits into
openvinotoolkit:masterfrom
culhatsker:ubuntu26

Conversation

@culhatsker

Copy link
Copy Markdown
Collaborator
  • remove more windows mentions
  • remove older image distributions
  • add single-template support
  • add ubuntu26 support
  • update GPU, NPU drivers

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are correctness and safety issues in the new single-template rendering path (output path computation for non-docker RHEL platforms and overly-verbose WARNING logging of template params), plus a hard-disabled NPU block and outdated CLI help text that should be fixed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds Ubuntu 26.04 image generation support and simplifies the build matrix by removing legacy Windows/base/custom/dev_no_samples distributions, while updating Ubuntu 24.04 GPU/NPU driver bits and moving toward a single-template Dockerfile rendering path.

Changes:

  • Add Ubuntu 26.04 templates (single dockerfile.j2, resources, and third-party notices) and allow ubuntu26 as an OS target.
  • Remove Windows-specific CLI args and simplify distribution selection to runtime / dev.
  • Update Ubuntu 24.04 GPU and NPU driver download URLs; remove dev_no_samples template paths and related conditional logic.
File summaries
File Description
utils/tests/test_arg_parser.py Updates tests to align with removed Windows/MSBuild CLI flags.
utils/render.py Introduces “single-template” rendering via dockerfile.j2 + resources.json.
utils/arg_parser.py Adds ubuntu26 OS and restricts --distribution choices; removes legacy distribution logic.
templates/ubuntu26/third-party-programs-docker-runtime.txt Adds Ubuntu 26.04 runtime third-party notices.
templates/ubuntu26/third-party-programs-docker-dev.txt Adds Ubuntu 26.04 dev third-party notices.
templates/ubuntu26/resources.json Adds Ubuntu 26.04 resource inputs (GPU package URLs, NPU URL placeholder).
templates/ubuntu26/dockerfile.j2 Adds the Ubuntu 26.04 single-template Dockerfile definition.
templates/ubuntu24/install/install.dockerfile.j2 Simplifies “remove samples” condition to only no_samples.
templates/ubuntu24/install/copy.dockerfile.j2 Simplifies “remove samples” condition to only no_samples.
templates/ubuntu24/hw/npu.dockerfile.j2 Updates Ubuntu 24.04 NPU driver URL.
templates/ubuntu24/hw/gpu.dockerfile.j2 Updates Ubuntu 24.04 GPU driver package set/versions and checksum file.
templates/ubuntu24/env/dev_no_samples_env.dockerfile.j2 Removes the dev_no_samples environment template.
templates/ubuntu24/common/base.dockerfile.j2 Removes dev_no_samples/fallback branches and narrows dependency selection.
templates/ubuntu22/install/install.dockerfile.j2 Simplifies “remove samples” condition to only no_samples.
templates/ubuntu22/install/copy.dockerfile.j2 Simplifies “remove samples” condition to only no_samples.
templates/ubuntu22/env/dev_no_samples_env.dockerfile.j2 Removes the dev_no_samples environment template.
templates/ubuntu22/common/base.dockerfile.j2 Removes dev_no_samples/fallback branches and narrows dependency selection.
templates/ubuntu20/install/install.dockerfile.j2 Simplifies “remove samples” condition to only no_samples.
templates/ubuntu20/install/copy.dockerfile.j2 Simplifies “remove samples” condition to only no_samples.
templates/ubuntu20/env/dev_no_samples_env.dockerfile.j2 Removes the dev_no_samples environment template.
templates/ubuntu20/common/base.dockerfile.j2 Removes dev_no_samples/fallback branches and narrows dependency selection.
Review details

Suppressed comments (1)

utils/arg_parser.py:229

  • The --distribution help text still documents removed distributions (dev_no_samples, base) and flags/requirements that no longer exist after narrowing choices to runtime and dev, which will mislead CLI users. Update the help string to match the supported values.
            help="Distribution type: dev, dev_no_samples, runtime or "
            "base (with CPU only and without installing dependencies). "
            "Using key --file <path_to_dockerfile> and "
            "-p <version> are mandatory to build base distribution image."
            "base dockerfiles are stored in <repository_root>/dockerfiles/<os_image> folder.",
  • Files reviewed: 20/21 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread templates/ubuntu26/dockerfile.j2 Outdated
&& apt-get install -y --no-install-recommends ./*.deb \
&& rm -rf * \
{%- endif %}
{% if False and device_npu -%}
Comment thread utils/render.py Outdated
Comment on lines +32 to +36
def get_new_base_template(self) -> jinja2.environment.Template:
try:
return self.env.get_template('dockerfile.j2')
except jinja2.exceptions.TemplateNotFound:
return None
Comment thread utils/render.py Outdated
Comment on lines +55 to +58
save_to = save_to_dir / args.dockerfile_name
if args.rhel_platform != 'docker':
save_to_dir /= args.rhel_platform
if not save_to_dir.exists():
save_to_dir.mkdir()
save_to = save_to_dir / args.dockerfile_name
self.get_base_template().stream(pre_commands=pre_commands, commands=commands,
layers=layers, **kwargs).dump(str(save_to))
save_to_dir.mkdir(parents=True, exist_ok=True)
Comment thread utils/render.py Outdated
params["devices"] = args.device
for device in args.device:
params[f"device_{device}"] = True
log.warning(f"TEMPLATE ENV: {params}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants