Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NPU dependencies to Ubuntu 22 #309

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion templates/ubuntu22/hw/gpu.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions templates/ubuntu22/hw/npu.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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/*
16 changes: 8 additions & 8 deletions utils/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
)

Expand Down Expand Up @@ -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'

Expand All @@ -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']

Expand Down
Loading