Ubuntu 26.04 support - #342
Conversation
culhatsker
commented
Sep 8, 2026
- remove more windows mentions
- remove older image distributions
- add single-template support
- add ubuntu26 support
- update GPU, NPU drivers
There was a problem hiding this comment.
🟡 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 allowubuntu26as 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_samplestemplate 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
--distributionhelp text still documents removed distributions (dev_no_samples,base) and flags/requirements that no longer exist after narrowingchoicestoruntimeanddev, 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.
| && apt-get install -y --no-install-recommends ./*.deb \ | ||
| && rm -rf * \ | ||
| {%- endif %} | ||
| {% if False and device_npu -%} |
| def get_new_base_template(self) -> jinja2.environment.Template: | ||
| try: | ||
| return self.env.get_template('dockerfile.j2') | ||
| except jinja2.exceptions.TemplateNotFound: | ||
| return None |
| 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) |
| params["devices"] = args.device | ||
| for device in args.device: | ||
| params[f"device_{device}"] = True | ||
| log.warning(f"TEMPLATE ENV: {params}") |