From ac11caeaa163c11327818066a990dc29a6a881e3 Mon Sep 17 00:00:00 2001 From: Egor Tiuvaev Date: Mon, 29 Jul 2024 13:03:53 +0200 Subject: [PATCH 1/2] Add NPU dependencies to Ubuntu 22 --- templates/ubuntu22/hw/gpu.dockerfile.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/ubuntu22/hw/gpu.dockerfile.j2 b/templates/ubuntu22/hw/gpu.dockerfile.j2 index 8c442bf7..7df8b640 100644 --- a/templates/ubuntu22/hw/gpu.dockerfile.j2 +++ b/templates/ubuntu22/hw/gpu.dockerfile.j2 @@ -5,9 +5,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* # hadolint ignore=DL3003 RUN mkdir /tmp/gpu_deps && cd /tmp/gpu_deps && \ - curl -L -O https://github.com/intel/compute-runtime/releases/download/23.05.25593.11/libigdgmm12_22.3.0_amd64.deb && \ curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13700.14/intel-igc-core_1.0.13700.14_amd64.deb && \ curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13700.14/intel-igc-opencl_1.0.13700.14_amd64.deb && \ curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/intel-opencl-icd_23.13.26032.30_amd64.deb && \ curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/libigdgmm12_22.3.0_amd64.deb && \ + curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/intel-level-zero-gpu_1.3.26032.30_amd64.deb && \ + curl -L -O https://github.com/oneapi-src/level-zero/releases/download/v1.17.19/level-zero_1.17.19+u22.04_amd64.deb && \ dpkg -i ./*.deb && rm -Rf /tmp/gpu_deps From 36cf4fef33ea668ea9b68a33ce270a07dc03791d Mon Sep 17 00:00:00 2001 From: Egor Tiuvaev Date: Mon, 29 Jul 2024 16:10:38 +0200 Subject: [PATCH 2/2] Add NPU packages to Ubuntu 22 --- templates/ubuntu22/hw/npu.dockerfile.j2 | 10 ++++++++++ utils/arg_parser.py | 16 ++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 templates/ubuntu22/hw/npu.dockerfile.j2 diff --git a/templates/ubuntu22/hw/npu.dockerfile.j2 b/templates/ubuntu22/hw/npu.dockerfile.j2 new file mode 100644 index 00000000..2ac147c3 --- /dev/null +++ b/templates/ubuntu22/hw/npu.dockerfile.j2 @@ -0,0 +1,10 @@ +# NPU dependencies +# hadolint ignore=DL3003 +RUN apt-get update && \ + mkdir /tmp/npu_deps && \ + cd /tmp/npu_deps && \ + curl -LO https://github.com/intel/linux-npu-driver/releases/download/v1.5.1/intel-driver-compiler-npu_1.5.1.20240708-9842236399_ubuntu22.04_amd64.deb && \ + curl -LO https://github.com/intel/linux-npu-driver/releases/download/v1.5.1/intel-level-zero-npu_1.5.1.20240708-9842236399_ubuntu22.04_amd64.deb && \ + curl -LO https://github.com/oneapi-src/level-zero/releases/download/v1.17.19/level-zero_1.17.19+u22.04_amd64.deb && \ + apt install -y ./*.deb && \ + rm -rf /var/lib/apt/lists/* /tmp/* diff --git a/utils/arg_parser.py b/utils/arg_parser.py index 26bbb627..3844ae74 100644 --- a/utils/arg_parser.py +++ b/utils/arg_parser.py @@ -21,7 +21,7 @@ class DockerCIArgumentParser(argparse.ArgumentParser): """CLI argument parser for this framework""" - SUPPORTED_OS: typing.List = ['ubuntu18', 'ubuntu20', 'ubuntu22', 'winserver2019', 'windows20h2', 'rhel8'] + SUPPORTED_OS: typing.List = ['ubuntu18', 'ubuntu20', 'ubuntu22', 'ubuntu24', 'winserver2019', 'windows20h2', 'rhel8'] def __init__(self, prog: typing.Optional[str] = None, description: typing.Optional[str] = None): super().__init__(prog=prog, description=description, @@ -105,7 +105,7 @@ def add_build_args(parser: argparse.ArgumentParser): parser.add_argument( '-py', '--python', - choices=['python37', 'python38', 'python310'], + choices=['python37', 'python38', 'python310', 'python311', 'python312', 'python313'], help='Python interpreter for docker image, currently default is python38', ) @@ -455,8 +455,10 @@ def parse_args(name: str, description: str): # noqa 'It is an insecure way.') if not args.python: - if args.os in ('ubuntu22'): + if args.os in ('ubuntu22', ): args.python = 'python310' + elif args.os in ('ubuntu24', ): + args.python = 'python312' else: args.python = 'python38' @@ -478,12 +480,10 @@ def parse_args(name: str, description: str): # noqa # workaround for https://bugs.python.org/issue16399 issue if not args.device and 'win' not in args.os: - if args.distribution == 'base': - args.device = ['cpu'] - elif args.os == 'rhel8': - args.device = ['cpu', 'gpu'] + if args.os in ('ubuntu22', 'ubuntu24'): + args.device = ['cpu', 'gpu', 'npu'] else: - args.device = ['cpu', 'gpu'] # 2022.3 v/h not supported + args.device = ['cpu', 'gpu'] elif not args.device: args.device = ['cpu']