Skip to content

Commit 8ac5c56

Browse files
authored
Add NPU drivers to Ubuntu24 and Ubuntu22 (#323)
* Add NPU drivers to Ubuntu24 and Ubuntu22 * Fix tests
1 parent 9fe6533 commit 8ac5c56

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# for NPU
2+
3+
# from https://github.com/oneapi-src/level-zero/releases/tag/v1.20.2
4+
# from https://github.com/intel/linux-npu-driver/releases/tag/v1.16.0
5+
6+
RUN mkdir /tmp/npu_deps && cd /tmp/npu_deps && \
7+
curl -L -O https://github.com/oneapi-src/level-zero/releases/download/v1.20.2/level-zero_1.20.2+u22.04_amd64.deb && \
8+
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.16.0/intel-level-zero-npu_1.16.0.20250328-14132024782_ubuntu22.04_amd64.deb && \
9+
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.16.0/intel-driver-compiler-npu_1.16.0.20250328-14132024782_ubuntu22.04_amd64.deb && \
10+
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.16.0/intel-fw-npu_1.16.0.20250328-14132024782_ubuntu22.04_amd64.deb && \
11+
apt update && apt install -y ./*.deb && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/npu_deps
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# for NPU
2+
3+
# from https://github.com/oneapi-src/level-zero/releases/tag/v1.20.2
4+
# from https://github.com/intel/linux-npu-driver/releases/tag/v1.16.0
5+
6+
RUN mkdir /tmp/npu_deps && cd /tmp/npu_deps && \
7+
curl -L -O https://github.com/oneapi-src/level-zero/releases/download/v1.20.2/level-zero_1.20.2+u24.04_amd64.deb && \
8+
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.16.0/intel-driver-compiler-npu_1.16.0.20250328-14132024782_ubuntu24.04_amd64.deb && \
9+
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.16.0/intel-fw-npu_1.16.0.20250328-14132024782_ubuntu24.04_amd64.deb && \
10+
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.16.0/intel-level-zero-npu_1.16.0.20250328-14132024782_ubuntu24.04_amd64.deb && \
11+
apt update && apt install -y ./*.deb && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/npu_deps

utils/arg_parser.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,10 @@ def parse_args(name: str, description: str): # noqa
548548
if not args.device and "win" not in args.os:
549549
if args.distribution == "base":
550550
args.device = ["cpu"]
551-
elif args.os == "rhel8":
551+
elif args.os in ("rhel8", "ubuntu18", "ubuntu20"):
552552
args.device = ["cpu", "gpu"]
553553
else:
554-
args.device = ["cpu", "gpu"] # 2022.3 v/h not supported
554+
args.device = ["cpu", "gpu", "npu"]
555555
elif not args.device:
556556
args.device = ["cpu"]
557557

utils/tests/test_arg_parser.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
'image_json_path': 'image_data.json',
4545
},
4646
{
47-
'device': ['cpu', 'gpu'],
48-
'dockerfile_name': 'openvino_cg_dev_2022.1.0.dockerfile',
47+
'device': ['cpu', 'gpu', 'npu'],
48+
'dockerfile_name': 'openvino_cgn_dev_2022.1.0.dockerfile',
4949
'python': 'python310',
5050
'tags': ['ubuntu22_dev:2022.1.0', 'ubuntu22_dev:latest'],
5151
'image_json_path': pathlib.Path('image_data.json').absolute(),
@@ -62,8 +62,8 @@
6262
'source': 'local',
6363
},
6464
{
65-
'device': ['cpu', 'gpu'],
66-
'dockerfile_name': 'openvino_cg_dev_2024.5.0.0.dockerfile',
65+
'device': ['cpu', 'gpu', 'npu'],
66+
'dockerfile_name': 'openvino_cgn_dev_2024.5.0.0.dockerfile',
6767
'python': 'python310',
6868
'tags': ['ubuntu22_dev:2024.5.0.0', 'ubuntu22_dev:latest'],
6969
'distribution': 'dev',
@@ -82,8 +82,8 @@
8282
'tag_postfix': '_qqq',
8383
},
8484
{
85-
'device': ['cpu', 'gpu'],
86-
'dockerfile_name': 'openvino_cg_dev_2024.5.0.0.dockerfile',
85+
'device': ['cpu', 'gpu', 'npu'],
86+
'dockerfile_name': 'openvino_cgn_dev_2024.5.0.0.dockerfile',
8787
'python': 'python310',
8888
'tags': ['ubuntu22_dev:2024.5.0.0', 'ubuntu22_dev:latest', 'ubuntu22_dev:2024.5.0.0_qqq'],
8989
'distribution': 'dev',
@@ -137,9 +137,9 @@
137137
'product_version': '2022.1.0',
138138
},
139139
{
140-
'device': ['cpu', 'gpu'],
140+
'device': ['cpu', 'gpu', 'npu'],
141141
'python': 'python310',
142-
'dockerfile_name': 'openvino_cg_dev_2022.1.0.dockerfile',
142+
'dockerfile_name': 'openvino_cgn_dev_2022.1.0.dockerfile',
143143
'tags': ['ubuntu22_dev:2022.1.0', 'ubuntu22_dev:latest'],
144144
'distribution': 'dev',
145145
'product_version': '2022.1.0',
@@ -155,9 +155,9 @@
155155
'product_version': '2022.1',
156156
},
157157
{
158-
'device': ['cpu', 'gpu'],
158+
'device': ['cpu', 'gpu', 'npu'],
159159
'python': 'python310',
160-
'dockerfile_name': 'openvino_cg_dev_2022.1.0.dockerfile',
160+
'dockerfile_name': 'openvino_cgn_dev_2022.1.0.dockerfile',
161161
'tags': ['ubuntu22_dev:2022.1.0', 'ubuntu22_dev:latest'],
162162
'distribution': 'dev',
163163
'product_version': '2022.1.0',
@@ -173,9 +173,9 @@
173173
'source': 'local',
174174
},
175175
{
176-
'device': ['cpu', 'gpu'],
176+
'device': ['cpu', 'gpu', 'npu'],
177177
'python': 'python310',
178-
'dockerfile_name': 'openvino_cg_dev_2024.5.0.0.dev20240905.dockerfile',
178+
'dockerfile_name': 'openvino_cgn_dev_2024.5.0.0.dev20240905.dockerfile',
179179
'tags': ['ubuntu22_dev:2024.5.0.0.dev20240905', 'ubuntu22_dev:latest'],
180180
'distribution': 'dev',
181181
'product_version': '2024.5.0.0.dev20240905',
@@ -253,10 +253,10 @@
253253
'registry': 'https://deploy',
254254
},
255255
{
256-
'device': ['cpu', 'gpu'],
256+
'device': ['cpu', 'gpu', 'npu'],
257257
'python': 'python310',
258258
'tags': ['ubuntu22_dev:2024.5.0.0', 'ubuntu22_dev:latest'],
259-
'dockerfile_name': 'openvino_cg_dev_2024.5.0.0.dockerfile',
259+
'dockerfile_name': 'openvino_cgn_dev_2024.5.0.0.dockerfile',
260260
'distribution': 'dev',
261261
'product_version': '2024.5.0.0',
262262
},

0 commit comments

Comments
 (0)